summaryrefslogtreecommitdiffstats
path: root/drivers/dma
diff options
context:
space:
mode:
authorAxel Lin <axel.lin@gmail.com>2011-07-12 21:00:13 +0800
committerVinod Koul <vinod.koul@intel.com>2011-07-25 19:11:12 +0530
commit1c1d9547536480626c1be1fb062b81663fb2b88e (patch)
tree36cfcb4a110a980a36469589c8ad4df5e29280a9 /drivers/dma
parent0b052f4a088ddc47a5da23dd733522241314cfb4 (diff)
downloadblackbird-obmc-linux-1c1d9547536480626c1be1fb062b81663fb2b88e.tar.gz
blackbird-obmc-linux-1c1d9547536480626c1be1fb062b81663fb2b88e.zip
dmaengine: imx-sdma: return proper error if kzalloc fails
Signed-off-by: Axel Lin <axel.lin@gmail.com> Acked-by: Sascha Hauer <s.hauer@pengutronix.de> Signed-off-by: Vinod Koul <vinod.koul@intel.com>
Diffstat (limited to 'drivers/dma')
-rw-r--r--drivers/dma/imx-sdma.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/dma/imx-sdma.c b/drivers/dma/imx-sdma.c
index b6d1455fa936..ec53980f8fcf 100644
--- a/drivers/dma/imx-sdma.c
+++ b/drivers/dma/imx-sdma.c
@@ -1281,8 +1281,10 @@ static int __init sdma_probe(struct platform_device *pdev)
goto err_request_irq;
sdma->script_addrs = kzalloc(sizeof(*sdma->script_addrs), GFP_KERNEL);
- if (!sdma->script_addrs)
+ if (!sdma->script_addrs) {
+ ret = -ENOMEM;
goto err_alloc;
+ }
sdma->version = pdata->sdma_version;
OpenPOWER on IntegriCloud