DMA: PL330: return ENOMEM instead of 0 from pl330_alloc_chan_resources
authorInderpal Singh <inderpal.singh@linaro.org>
Mon, 17 Sep 2012 04:27:45 +0000 (09:57 +0530)
committerVinod Koul <vinod.koul@linux.intel.com>
Tue, 18 Sep 2012 03:31:39 +0000 (09:01 +0530)
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>
drivers/dma/pl330.c

index 7e543698fa23aea6f3f7d5f5be3da5c2f60b38cf..28322dced886b9655ef67c78a83f0e2ee65b0942 100644 (file)
@@ -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);
This page took 0.030056 seconds and 5 git commands to generate.