ASoC: fsl_asrc_m2m: fix pm_runtime usage counter leak on error
Subsystems (3)
PATCH 1/1 ASoC: fsl_asrc_m2m: fix pm_runtime usage counter leak on error
From: bui duc phuc <[email protected]>
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.
--- sound/soc/fsl/fsl_asrc_m2m.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
sound/soc/fsl/fsl_asrc_m2m.c +1 -1
@@ -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;
Signature · 1 line
2.43.0
Mark Brown
maintainerQuoted 1 line · On Thu, 17 Sep 2026 19:11:36 +0700, [email protected] wrote:
ASoC:
fsl_asrc_m2m: fixpm_runtimeusage 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