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

From: Wan Jiabing
Date: Mon May 16 2022 - 04:43:02 EST


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

Signed-off-by: Wan Jiabing <wanjiabing@xxxxxxxx>
---
drivers/dma/xgene-dma.c | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/drivers/dma/xgene-dma.c b/drivers/dma/xgene-dma.c
index 3589b4ef50b8..7f0088b09714 100644
--- a/drivers/dma/xgene-dma.c
+++ b/drivers/dma/xgene-dma.c
@@ -1769,8 +1769,7 @@ static int xgene_dma_probe(struct platform_device *pdev)

err_dma_mask:
err_clk_enable:
- if (!IS_ERR(pdma->clk))
- clk_disable_unprepare(pdma->clk);
+ clk_disable_unprepare(pdma->clk);

return ret;
}
@@ -1794,8 +1793,7 @@ static int xgene_dma_remove(struct platform_device *pdev)
xgene_dma_delete_chan_rings(chan);
}

- if (!IS_ERR(pdma->clk))
- clk_disable_unprepare(pdma->clk);
+ clk_disable_unprepare(pdma->clk);

return 0;
}
--
2.36.1