diff mbox series

[-next] dmaengine: dw-axi-dmac: Add missing clk_disable_unprepare in axi_dma_resume

Message ID 20240803063415.319565-1-cuigaosheng1@huawei.com (mailing list archive)
State New
Headers show
Series [-next] dmaengine: dw-axi-dmac: Add missing clk_disable_unprepare in axi_dma_resume | expand

Commit Message

cuigaosheng Aug. 3, 2024, 6:34 a.m. UTC
Add the missing clk_disable_unprepare() before return in
axi_dma_resume().

Signed-off-by: Gaosheng Cui <cuigaosheng1@huawei.com>
---
 drivers/dma/dw-axi-dmac/dw-axi-dmac-platform.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/drivers/dma/dw-axi-dmac/dw-axi-dmac-platform.c b/drivers/dma/dw-axi-dmac/dw-axi-dmac-platform.c
index fffafa86d964..8bada153bfed 100644
--- a/drivers/dma/dw-axi-dmac/dw-axi-dmac-platform.c
+++ b/drivers/dma/dw-axi-dmac/dw-axi-dmac-platform.c
@@ -1334,8 +1334,10 @@  static int axi_dma_resume(struct axi_dma_chip *chip)
 		return ret;
 
 	ret = clk_prepare_enable(chip->core_clk);
-	if (ret < 0)
+	if (ret < 0) {
+		clk_disable_unprepare(chip->cfgr_clk);
 		return ret;
+	}
 
 	axi_dma_enable(chip);
 	axi_dma_irq_enable(chip);