From: Inderpal Singh Date: Mon, 17 Sep 2012 04:27:45 +0000 (+0530) Subject: DMA: PL330: return ENOMEM instead of 0 from pl330_alloc_chan_resources X-Git-Tag: upstream/snapshot3+hdmi~6488^2~8 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=027478851791df751176398be02a3b1c5f6aa824;p=platform%2Fadaptation%2Frenesas_rcar%2Frenesas_kernel.git DMA: PL330: return ENOMEM instead of 0 from pl330_alloc_chan_resources 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 Acked-by: Jassi Brar Acked-by: Kukjin Kim Signed-off-by: Vinod Koul --- diff --git a/drivers/dma/pl330.c b/drivers/dma/pl330.c index 7e54369..28322dc 100644 --- a/drivers/dma/pl330.c +++ b/drivers/dma/pl330.c @@ -2390,7 +2390,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);