* [PATCH] ASoC: codecs: lpass-rx-macro: fix PM ref leak in swclk_gate_enable
@ 2026-10-28 11:45 Tang Bin
2026-10-29 17:32 ` Prasad Kumpatla
2026-11-01 23:46 ` Mark Brown
0 siblings, 2 replies; 3+ messages in thread
From: Tang Bin @ 2026-10-28 11:45 UTC (permalink / raw)
To: srini, lgirdwood, broonie, perex, tiwai
Cc: linux-sound, linux-arm-msm, linux-kernel, tangbin
swclk_gate_enable() calls pm_runtime_resume_and_get() (incrementing the PM
usage counter and, via of_pm_clk_add_clks, enabling mclk) before
rx_macro_mclk_enable(). On rx_macro_mclk_enable() failure it called
clk_disable_unprepare(rx->mclk) and returned, leaking the PM usage counter
and potentially unbalancing the clock that the PM clock domain also
manages. The sibling tx-macro/va-macro drivers call
pm_runtime_put_autosuspend() here; do the same.
Fixes: e38cbb75248a ("ASoC: codecs: lpass-rx-macro: Propagate regcache_sync() errors")
Signed-off-by: Tang Bin <tangbin@cmss.chinamobile.com>
---
sound/soc/codecs/lpass-rx-macro.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/sound/soc/codecs/lpass-rx-macro.c b/sound/soc/codecs/lpass-rx-macro.c
index 282a6aaa9..1737d525c 100644
--- a/sound/soc/codecs/lpass-rx-macro.c
+++ b/sound/soc/codecs/lpass-rx-macro.c
@@ -3681,7 +3681,7 @@ static int swclk_gate_enable(struct clk_hw *hw)
ret = rx_macro_mclk_enable(rx, true);
if (ret) {
- clk_disable_unprepare(rx->mclk);
+ pm_runtime_put_autosuspend(rx->dev);
return ret;
}
--
2.52.0.windows.1
^ permalink raw reply [flat|nested] 3+ messages in thread* Re: [PATCH] ASoC: codecs: lpass-rx-macro: fix PM ref leak in swclk_gate_enable
2026-10-28 11:45 [PATCH] ASoC: codecs: lpass-rx-macro: fix PM ref leak in swclk_gate_enable Tang Bin
@ 2026-10-29 17:32 ` Prasad Kumpatla
2026-11-01 23:46 ` Mark Brown
1 sibling, 0 replies; 3+ messages in thread
From: Prasad Kumpatla @ 2026-10-29 17:32 UTC (permalink / raw)
To: Tang Bin, srini, lgirdwood, broonie, perex, tiwai
Cc: linux-sound, linux-arm-msm, linux-kernel
On 10/28/2026 5:15 PM, Tang Bin wrote:
> swclk_gate_enable() calls pm_runtime_resume_and_get() (incrementing the PM
> usage counter and, via of_pm_clk_add_clks, enabling mclk) before
> rx_macro_mclk_enable(). On rx_macro_mclk_enable() failure it called
> clk_disable_unprepare(rx->mclk) and returned, leaking the PM usage counter
> and potentially unbalancing the clock that the PM clock domain also
> manages. The sibling tx-macro/va-macro drivers call
> pm_runtime_put_autosuspend() here; do the same.
>
> Fixes: e38cbb75248a ("ASoC: codecs: lpass-rx-macro: Propagate regcache_sync() errors")
> Signed-off-by: Tang Bin <tangbin@cmss.chinamobile.com>
LGTM,
Reviewed-by: Prasad Kumpatla<prasad.kumpatla@oss.qualcomm.com>
Thanks,
Prasad
^ permalink raw reply [flat|nested] 3+ messages in thread* Re: [PATCH] ASoC: codecs: lpass-rx-macro: fix PM ref leak in swclk_gate_enable
2026-10-28 11:45 [PATCH] ASoC: codecs: lpass-rx-macro: fix PM ref leak in swclk_gate_enable Tang Bin
2026-10-29 17:32 ` Prasad Kumpatla
@ 2026-11-01 23:46 ` Mark Brown
1 sibling, 0 replies; 3+ messages in thread
From: Mark Brown @ 2026-11-01 23:46 UTC (permalink / raw)
To: srini, lgirdwood, perex, tiwai, Tang Bin
Cc: linux-sound, linux-arm-msm, linux-kernel
On Wed, 28 Oct 2026 19:45:00 +0800, Tang Bin wrote:
> ASoC: codecs: lpass-rx-macro: fix PM ref leak in swclk_gate_enable
Applied to
https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git for-7.4
Thanks!
[1/1] ASoC: codecs: lpass-rx-macro: fix PM ref leak in swclk_gate_enable
https://git.kernel.org/broonie/sound/c/e2df0223ba6d
All being well this means that it will be integrated into the linux-next
tree (usually sometime in the next 24 hours) and sent to Linus during
the next merge window (or sooner if it is a bug fix), however if
problems are discovered then the patch may be dropped or reverted.
You may get further e-mails resulting from automated or manual testing
and review of the tree, please engage with people reporting problems and
send followup patches addressing any issues that are reported if needed.
If any updates are required or you are submitting further changes they
should be sent as incremental updates against current git, existing
patches will not be replaced.
Please add any relevant lists and maintainers to the CCs when replying
to this mail.
Thanks,
Mark
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2026-11-02 12:41 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-10-28 11:45 [PATCH] ASoC: codecs: lpass-rx-macro: fix PM ref leak in swclk_gate_enable Tang Bin
2026-10-29 17:32 ` Prasad Kumpatla
2026-11-01 23:46 ` Mark Brown
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®