* [PATCH] ASoC: fsl_asrc_m2m: fix pm_runtime usage counter leak on error
@ 2026-09-17 12:11 phucduc.bui
2026-09-24 22:56 ` Mark Brown
0 siblings, 1 reply; 2+ messages in thread
From: phucduc.bui @ 2026-09-17 12:11 UTC (permalink / raw)
To: Jaroslav Kysela, Takashi Iwai, Liam Girdwood, Mark Brown,
Nicolin Chen, Fabio Estevam, Xiubo Li, Shengjiu Wang
Cc: linuxppc-dev, linux-sound, linux-kernel, bui duc phuc
From: bui duc phuc <phucduc.bui@gmail.com>
pm_runtime_get_sync() leaves the runtime PM usage counter incremented even
when it fails, but the error path in fsl_asrc_m2m_comp_open() does not
call pm_runtime_put_noidle() to balance it, leaking a reference each
time resume fails.
Use pm_runtime_resume_and_get() instead, which automatically drops the
usage counter on failure, fixing the leak.
Fixes: 24a01710f627 ("ASoC: fsl_asrc_m2m: Add memory to memory function")
Signed-off-by: bui duc phuc <phucduc.bui@gmail.com>
---
sound/soc/fsl/fsl_asrc_m2m.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/sound/soc/fsl/fsl_asrc_m2m.c b/sound/soc/fsl/fsl_asrc_m2m.c
index 4bc40f328f58..8bd2a144dbf9 100644
--- a/sound/soc/fsl/fsl_asrc_m2m.c
+++ b/sound/soc/fsl/fsl_asrc_m2m.c
@@ -320,7 +320,7 @@ static int fsl_asrc_m2m_comp_open(struct snd_compr_stream *stream)
if (ret)
goto error_alloc_out_buf;
- ret = pm_runtime_get_sync(dev);
+ ret = pm_runtime_resume_and_get(dev);
if (ret < 0) {
dev_err(dev, "Failed to power up asrc\n");
goto err_pm_runtime;
--
2.43.0
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH] ASoC: fsl_asrc_m2m: fix pm_runtime usage counter leak on error
2026-09-17 12:11 [PATCH] ASoC: fsl_asrc_m2m: fix pm_runtime usage counter leak on error phucduc.bui
@ 2026-09-24 22:56 ` Mark Brown
0 siblings, 0 replies; 2+ messages in thread
From: Mark Brown @ 2026-09-24 22:56 UTC (permalink / raw)
To: Jaroslav Kysela, Takashi Iwai, Liam Girdwood, Nicolin Chen,
Fabio Estevam, Xiubo Li, Shengjiu Wang, phucduc.bui
Cc: linuxppc-dev, linux-sound, linux-kernel
On Thu, 17 Sep 2026 19:11:36 +0700, phucduc.bui@gmail.com wrote:
> ASoC: fsl_asrc_m2m: fix pm_runtime usage counter leak on error
Applied to
https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git for-7.4
Thanks!
[1/1] ASoC: fsl_asrc_m2m: fix pm_runtime usage counter leak on error
https://git.kernel.org/broonie/sound/c/5626653a4bdf
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] 2+ messages in thread
end of thread, other threads:[~2026-09-25 17:10 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-09-17 12:11 [PATCH] ASoC: fsl_asrc_m2m: fix pm_runtime usage counter leak on error phucduc.bui
2026-09-24 22:56 ` 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®