]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
dmaengine: fsl-edma: Fix clk leak on alloc_chan_resources failure
authorZhen Ni <zhen.ni@easystack.cn>
Wed, 21 Jan 2026 12:04:21 +0000 (07:04 -0500)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 23 Jan 2026 10:18:51 +0000 (11:18 +0100)
commitce358252a943c8ed19f6ad096d2f84d7c504825e
tree2a085b5aa52b47cba2e744312514dca37ec8e6b0
parent027d42b97e6eb827c3438ebc09bab7efaee9270d
dmaengine: fsl-edma: Fix clk leak on alloc_chan_resources failure

[ Upstream commit b18cd8b210417f90537d914ffb96e390c85a7379 ]

When fsl_edma_alloc_chan_resources() fails after clk_prepare_enable(),
the error paths only free IRQs and destroy the TCD pool, but forget to
call clk_disable_unprepare(). This causes the channel clock to remain
enabled, leaking power and resources.

Fix it by disabling the channel clock in the error unwind path.

Fixes: d8d4355861d8 ("dmaengine: fsl-edma: add i.MX8ULP edma support")
Cc: stable@vger.kernel.org
Suggested-by: Frank Li <Frank.Li@nxp.com>
Signed-off-by: Zhen Ni <zhen.ni@easystack.cn>
Reviewed-by: Frank Li <Frank.Li@nxp.com>
Link: https://patch.msgid.link/20251014090522.827726-1-zhen.ni@easystack.cn
Signed-off-by: Vinod Koul <vkoul@kernel.org>
[ Different error handling scheme ]
Signed-off-by: Sasha Levin <sashal@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/dma/fsl-edma-common.c