[PATCH 5/6] ASoC: rockchip: rockchip_pdm: Fix unbalanced clk disable in remove
Arina Kharlamova via B4 Relay
devnull+arina.kharlamova.mbzuai.ac.ae at kernel.org
Tue Dec 1 11:23:36 PST 2026
From: Arina Kharlamova <arina.kharlamova at mbzuai.ac.ae>
pdm->clk is enabled only by rockchip_pdm_runtime_resume() and disabled
by rockchip_pdm_runtime_suspend(). rockchip_pdm_remove() disables
runtime PM, calls rockchip_pdm_runtime_suspend() by hand if the device
is not suspended yet, and then calls clk_disable_unprepare(pdm->clk)
once more. The driver holds no enable on that clock at this point, so
every unbind disables and unprepares it one time too many. The clk core
warns that the clock is already disabled and already unprepared, unless
another consumer still has it enabled.
Drop the extra call. The clk_disable_unprepare(pdm->hclk) that follows
stays because it pairs with the clk_prepare_enable() in
rockchip_pdm_probe().
Fixes: fc05a5b22253 ("ASoC: rockchip: add support for pdm controller")
Signed-off-by: Arina Kharlamova <arina.kharlamova at mbzuai.ac.ae>
---
sound/soc/rockchip/rockchip_pdm.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/sound/soc/rockchip/rockchip_pdm.c b/sound/soc/rockchip/rockchip_pdm.c
index a0a89f5bddd9..cc057b47b4d0 100644
--- a/sound/soc/rockchip/rockchip_pdm.c
+++ b/sound/soc/rockchip/rockchip_pdm.c
@@ -670,7 +670,6 @@ static void rockchip_pdm_remove(struct platform_device *pdev)
if (!pm_runtime_status_suspended(&pdev->dev))
rockchip_pdm_runtime_suspend(&pdev->dev);
- clk_disable_unprepare(pdm->clk);
clk_disable_unprepare(pdm->hclk);
}
--
Git-157)
More information about the Linux-rockchip
mailing list