summaryrefslogtreecommitdiff
path: root/drivers/dma
diff options
context:
space:
mode:
authorArvind Yadav <arvind.yadav.cs@gmail.com>2017-08-07 13:15:19 +0530
committerVinod Koul <vinod.koul@intel.com>2017-08-21 22:20:44 +0530
commit87c56dcba4573441b5cc4b42ecbb35188fee8f04 (patch)
tree7e91022631e2795e84f17679a8587ba913ea0184 /drivers/dma
parent1edc85dc56690aeb490e8058b2515f277bdebd51 (diff)
dmaengine: at_xdmac: 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: Ludovic Desroches <ludovic.desroches@microchip.com> Signed-off-by: Vinod Koul <vinod.koul@intel.com>
Diffstat (limited to 'drivers/dma')
-rw-r--r--drivers/dma/at_xdmac.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/dma/at_xdmac.c b/drivers/dma/at_xdmac.c
index 6a3cf9709370..c00e3923d7d8 100644
--- a/drivers/dma/at_xdmac.c
+++ b/drivers/dma/at_xdmac.c
@@ -1883,8 +1883,11 @@ static int atmel_xdmac_resume(struct device *dev)
struct at_xdmac_chan *atchan;
struct dma_chan *chan, *_chan;
int i;
+ int ret;
- clk_prepare_enable(atxdmac->clk);
+ ret = clk_prepare_enable(atxdmac->clk);
+ if (ret)
+ return ret;
/* Clear pending interrupts. */
for (i = 0; i < atxdmac->dma.chancnt; i++) {