diff options
author | Andy Shevchenko <andriy.shevchenko@linux.intel.com> | 2014-05-08 12:01:50 +0300 |
---|---|---|
committer | Vinod Koul <vinod.koul@intel.com> | 2014-05-22 15:37:25 +0530 |
commit | 1222934e54b63752b4b1ad305d6a7f632a3ae46d (patch) | |
tree | 1202048315d5a25ffde4702756894152088f1d7d /drivers/dma/dw/core.c | |
parent | 8be4f523b48087765defd18483c66b268b3286e5 (diff) |
dmaengine: dw: check return code of dma_async_device_register()
dma_async_device_register() may return non-zero error code. In such case we
have to follow error path.
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: Vinod Koul <vinod.koul@intel.com>
Diffstat (limited to 'drivers/dma/dw/core.c')
-rw-r--r-- | drivers/dma/dw/core.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/drivers/dma/dw/core.c b/drivers/dma/dw/core.c index d539019fbe60..a27ded53ab4f 100644 --- a/drivers/dma/dw/core.c +++ b/drivers/dma/dw/core.c @@ -1659,13 +1659,17 @@ int dw_dma_probe(struct dw_dma_chip *chip, struct dw_dma_platform_data *pdata) dma_writel(dw, CFG, DW_CFG_DMA_EN); + err = dma_async_device_register(&dw->dma); + if (err) + goto err_dma_register; + dev_info(chip->dev, "DesignWare DMA Controller, %d channels\n", nr_channels); - dma_async_device_register(&dw->dma); - return 0; +err_dma_register: + free_irq(chip->irq, dw); err_pdata: clk_disable_unprepare(dw->clk); return err; |