From: Arvind Yadav Date: Mon, 7 Aug 2017 07:45:19 +0000 (+0530) Subject: dmaengine: at_xdmac: Handle return value of clk_prepare_enable. X-Git-Tag: v4.14-rc1~108^2~16 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=87c56dcba4573441b5cc4b42ecbb35188fee8f04;p=thirdparty%2Flinux.git 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 Acked-by: Ludovic Desroches Signed-off-by: Vinod Koul --- diff --git a/drivers/dma/at_xdmac.c b/drivers/dma/at_xdmac.c index 6a3cf97093701..c00e3923d7d81 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++) {