* [PATCH] DMA: PL330: return ENOMEM instead of 0 from pl330_alloc_chan_resources
@ 2012-09-17 4:27 Inderpal Singh
2012-09-17 5:47 ` Jassi Brar
2012-09-17 11:01 ` Kukjin Kim
0 siblings, 2 replies; 3+ messages in thread
From: Inderpal Singh @ 2012-09-17 4:27 UTC (permalink / raw)
To: linux-samsung-soc, linux-kernel
Cc: kgene.kim, vinod.koul, patches, boojin.kim, jassisinghbrar,
Inderpal Singh
Since 0 is not considered as error at dmaengine level, return ENOMEM
from pl330_alloc_chan_resources in case of failure.
Signed-off-by: Inderpal Singh <inderpal.singh@linaro.org>
---
drivers/dma/pl330.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/dma/pl330.c b/drivers/dma/pl330.c
index e4feba6..14d881c 100644
--- a/drivers/dma/pl330.c
+++ b/drivers/dma/pl330.c
@@ -2393,7 +2393,7 @@ static int pl330_alloc_chan_resources(struct dma_chan *chan)
pch->pl330_chid = pl330_request_channel(&pdmac->pif);
if (!pch->pl330_chid) {
spin_unlock_irqrestore(&pch->lock, flags);
- return 0;
+ return -ENOMEM;
}
tasklet_init(&pch->task, pl330_tasklet, (unsigned long) pch);
--
1.7.9.5
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] DMA: PL330: return ENOMEM instead of 0 from pl330_alloc_chan_resources
2012-09-17 4:27 [PATCH] DMA: PL330: return ENOMEM instead of 0 from pl330_alloc_chan_resources Inderpal Singh
@ 2012-09-17 5:47 ` Jassi Brar
2012-09-17 11:01 ` Kukjin Kim
1 sibling, 0 replies; 3+ messages in thread
From: Jassi Brar @ 2012-09-17 5:47 UTC (permalink / raw)
To: Inderpal Singh
Cc: linux-samsung-soc, linux-kernel, kgene.kim, vinod.koul, patches,
boojin.kim
On Mon, Sep 17, 2012 at 9:57 AM, Inderpal Singh
<inderpal.singh@linaro.org> wrote:
> Since 0 is not considered as error at dmaengine level, return ENOMEM
> from pl330_alloc_chan_resources in case of failure.
>
> Signed-off-by: Inderpal Singh <inderpal.singh@linaro.org>
Acked-by: Jassi Brar <jassisinghbrar@gmail.com>
> ---
> drivers/dma/pl330.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/dma/pl330.c b/drivers/dma/pl330.c
> index e4feba6..14d881c 100644
> --- a/drivers/dma/pl330.c
> +++ b/drivers/dma/pl330.c
> @@ -2393,7 +2393,7 @@ static int pl330_alloc_chan_resources(struct dma_chan *chan)
> pch->pl330_chid = pl330_request_channel(&pdmac->pif);
> if (!pch->pl330_chid) {
> spin_unlock_irqrestore(&pch->lock, flags);
> - return 0;
> + return -ENOMEM;
> }
>
> tasklet_init(&pch->task, pl330_tasklet, (unsigned long) pch);
> --
> 1.7.9.5
>
^ permalink raw reply [flat|nested] 3+ messages in thread
* RE: [PATCH] DMA: PL330: return ENOMEM instead of 0 from pl330_alloc_chan_resources
2012-09-17 4:27 [PATCH] DMA: PL330: return ENOMEM instead of 0 from pl330_alloc_chan_resources Inderpal Singh
2012-09-17 5:47 ` Jassi Brar
@ 2012-09-17 11:01 ` Kukjin Kim
1 sibling, 0 replies; 3+ messages in thread
From: Kukjin Kim @ 2012-09-17 11:01 UTC (permalink / raw)
To: 'Inderpal Singh', linux-samsung-soc, linux-kernel
Cc: vinod.koul, patches, boojin.kim, jassisinghbrar
Inderpal Singh wrote:
>
> Since 0 is not considered as error at dmaengine level, return ENOMEM
> from pl330_alloc_chan_resources in case of failure.
>
> Signed-off-by: Inderpal Singh <inderpal.singh@linaro.org>
Acked-by: Kukjin Kim <kgene.kim@samsung.com>
Thanks.
Best regards,
Kgene.
--
Kukjin Kim <kgene.kim@samsung.com>, Senior Engineer,
SW Solution Development Team, Samsung Electronics Co., Ltd.
> ---
> drivers/dma/pl330.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/dma/pl330.c b/drivers/dma/pl330.c
> index e4feba6..14d881c 100644
> --- a/drivers/dma/pl330.c
> +++ b/drivers/dma/pl330.c
> @@ -2393,7 +2393,7 @@ static int pl330_alloc_chan_resources(struct
> dma_chan *chan)
> pch->pl330_chid = pl330_request_channel(&pdmac->pif);
> if (!pch->pl330_chid) {
> spin_unlock_irqrestore(&pch->lock, flags);
> - return 0;
> + return -ENOMEM;
> }
>
> tasklet_init(&pch->task, pl330_tasklet, (unsigned long) pch);
> --
> 1.7.9.5
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2012-09-17 11:01 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-09-17 4:27 [PATCH] DMA: PL330: return ENOMEM instead of 0 from pl330_alloc_chan_resources Inderpal Singh
2012-09-17 5:47 ` Jassi Brar
2012-09-17 11:01 ` Kukjin Kim
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®