diff options
author | Arvind Yadav <arvind.yadav.cs@gmail.com> | 2017-05-22 16:01:48 +0530 |
---|---|---|
committer | Vinod Koul <vinod.koul@intel.com> | 2017-05-24 09:55:17 +0530 |
commit | 702fce05f5ad0e2af2c00d5ef41356ffdd4a3a56 (patch) | |
tree | 77be2870551d447de1ae0fe606f7c21f6596bf6f | |
parent | 14bebd01c5f5306c804bcb78d008df3a149dd0b3 (diff) | |
download | linux-702fce05f5ad0e2af2c00d5ef41356ffdd4a3a56.tar.bz2 |
dmaengine: DW DMAC: Handle return value of clk_prepare_enable
clk_prepare_enable() can fail here and we must check its return value.
Signed-off-by: Arvind Yadav <arvind.yadav.cs@gmail.com>
Acked-by: Viresh Kumar <viresh.kumar@linaro.org>
Acked-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: Vinod Koul <vinod.koul@intel.com>
-rw-r--r-- | drivers/dma/dw/platform.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/drivers/dma/dw/platform.c b/drivers/dma/dw/platform.c index c639c60b825a..bc31fe802061 100644 --- a/drivers/dma/dw/platform.c +++ b/drivers/dma/dw/platform.c @@ -306,8 +306,12 @@ static int dw_resume_early(struct device *dev) { struct platform_device *pdev = to_platform_device(dev); struct dw_dma_chip *chip = platform_get_drvdata(pdev); + int ret; + + ret = clk_prepare_enable(chip->clk); + if (ret) + return ret; - clk_prepare_enable(chip->clk); return dw_dma_enable(chip); } |