[PATCH 2/4] dmaengine: sprd-dma: Remove unneeded ERROR check before clk_disable_unprepare

Wan Jiabing wanjiabing at vivo.com
Mon May 16 01:41:37 PDT 2022


clk_disable_unprepare() already checks ERROR by using IS_ERR_OR_NULL.
Remove unneeded ERROR check for sdev->ashb_clk.

Signed-off-by: Wan Jiabing <wanjiabing at vivo.com>
---
 drivers/dma/sprd-dma.c | 7 +------
 1 file changed, 1 insertion(+), 6 deletions(-)

diff --git a/drivers/dma/sprd-dma.c b/drivers/dma/sprd-dma.c
index 7f158ef5672d..bf5ad879b5e2 100644
--- a/drivers/dma/sprd-dma.c
+++ b/drivers/dma/sprd-dma.c
@@ -279,12 +279,7 @@ static int sprd_dma_enable(struct sprd_dma_dev *sdev)
 static void sprd_dma_disable(struct sprd_dma_dev *sdev)
 {
 	clk_disable_unprepare(sdev->clk);
-
-	/*
-	 * Need to check if we need disable the optional ashb_clk for AGCP DMA.
-	 */
-	if (!IS_ERR(sdev->ashb_clk))
-		clk_disable_unprepare(sdev->ashb_clk);
+	clk_disable_unprepare(sdev->ashb_clk);
 }
 
 static void sprd_dma_set_uid(struct sprd_dma_chn *schan)
-- 
2.36.1




More information about the linux-arm-kernel mailing list