Commit 87c56dcb authored by Arvind Yadav's avatar Arvind Yadav Committed by Vinod Koul

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: default avatarArvind Yadav <arvind.yadav.cs@gmail.com>
Acked-by: default avatarLudovic Desroches <ludovic.desroches@microchip.com>
Signed-off-by: default avatarVinod Koul <vinod.koul@intel.com>
parent 1edc85dc
...@@ -1883,8 +1883,11 @@ static int atmel_xdmac_resume(struct device *dev) ...@@ -1883,8 +1883,11 @@ static int atmel_xdmac_resume(struct device *dev)
struct at_xdmac_chan *atchan; struct at_xdmac_chan *atchan;
struct dma_chan *chan, *_chan; struct dma_chan *chan, *_chan;
int i; int i;
int ret;
clk_prepare_enable(atxdmac->clk); ret = clk_prepare_enable(atxdmac->clk);
if (ret)
return ret;
/* Clear pending interrupts. */ /* Clear pending interrupts. */
for (i = 0; i < atxdmac->dma.chancnt; i++) { for (i = 0; i < atxdmac->dma.chancnt; i++) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment