Linux kernel and device drivers for NXP i.MX platforms
 help / color / mirror / Atom feed
* [PATCH] dmaengine: fsl-edma: Remove redundant check in fsl_edma_free_chan_resources()
@ 2025-10-14  2:47 Zhen Ni
  2025-10-14 15:37 ` Frank Li
  2026-02-25 11:23 ` Vinod Koul
  0 siblings, 2 replies; 3+ messages in thread
From: Zhen Ni @ 2025-10-14  2:47 UTC (permalink / raw)
  To: Frank.Li, vkoul; +Cc: imx, dmaengine, Zhen Ni

clk_disable_unprepare() is safe to call with a NULL clk, the
FSL_EDMA_DRV_HAS_CHCLK check is reduntante. Clean up redundant checks.

Suggested-by: Frank Li <Frank.Li@nxp.com>
Signed-off-by: Zhen Ni <zhen.ni@easystack.cn>
---
 drivers/dma/fsl-edma-common.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/dma/fsl-edma-common.c b/drivers/dma/fsl-edma-common.c
index 11655dcc4d6c..3007d5b7db55 100644
--- a/drivers/dma/fsl-edma-common.c
+++ b/drivers/dma/fsl-edma-common.c
@@ -884,8 +884,7 @@ void fsl_edma_free_chan_resources(struct dma_chan *chan)
 	fsl_chan->is_sw = false;
 	fsl_chan->srcid = 0;
 	fsl_chan->is_remote = false;
-	if (fsl_edma_drvflags(fsl_chan) & FSL_EDMA_DRV_HAS_CHCLK)
-		clk_disable_unprepare(fsl_chan->clk);
+	clk_disable_unprepare(fsl_chan->clk);
 }
 
 void fsl_edma_cleanup_vchan(struct dma_device *dmadev)
-- 
2.20.1


^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2026-02-25 11:24 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-10-14  2:47 [PATCH] dmaengine: fsl-edma: Remove redundant check in fsl_edma_free_chan_resources() Zhen Ni
2025-10-14 15:37 ` Frank Li
2026-02-25 11:23 ` Vinod Koul

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox