Skip to content

Commit

Permalink
DMA: PL330: return ENOMEM instead of 0 from pl330_alloc_chan_resources
Browse files Browse the repository at this point in the history
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>
Acked-by: Kukjin Kim <kgene.kim@samsung.com>
Signed-off-by: Vinod Koul <vinod.koul@linux.intel.com>
  • Loading branch information
Inderpal Singh authored and Vinod Koul committed Sep 18, 2012
1 parent 7c71b8e commit 0274788
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/dma/pl330.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 0274788

Please sign in to comment.