[PATCH 0/2] ASoC: fsl: fix m2m_init error path cleanup in fsl_asrc and fsl_easrc

shengjiu.wang@oss.nxp.com posted 2 patches 1 week, 3 days ago
sound/soc/fsl/fsl_asrc.c  | 2 +-
sound/soc/fsl/fsl_easrc.c | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
[PATCH 0/2] ASoC: fsl: fix m2m_init error path cleanup in fsl_asrc and fsl_easrc
Posted by shengjiu.wang@oss.nxp.com 1 week, 3 days ago
From: Shengjiu Wang <shengjiu.wang@nxp.com>

Both fsl_asrc_probe() and fsl_easrc_probe() call fsl_asrc_m2m_init()
near the end of their probe functions. On failure, the original code
did a bare return ret, bypassing the existing error labels that call
pm_runtime_disable(). This leaves runtime PM enabled and the device
in an inconsistent state after a failed probe.

Fix both drivers by replacing the bare return with a goto to the
appropriate cleanup label (err_pm_get_sync for fsl_asrc and
err_pm_disable for fsl_easrc), ensuring pm_runtime_disable() is
always called on the probe error path.

Shengjiu Wang (2):
  ASoC: fsl_asrc: fix m2m_init error path to use goto instead of bare
    return
  ASoC: fsl_easrc: fix m2m_init error path to use goto instead of bare
    return

 sound/soc/fsl/fsl_asrc.c  | 2 +-
 sound/soc/fsl/fsl_easrc.c | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

--
2.34.1
Re: [PATCH 0/2] ASoC: fsl: fix m2m_init error path cleanup in fsl_asrc and fsl_easrc
Posted by Mark Brown 5 days, 20 hours ago
On Wed, 15 Jul 2026 10:47:56 +0800, shengjiu.wang@oss.nxp.com wrote:
> ASoC: fsl: fix m2m_init error path cleanup in fsl_asrc and fsl_easrc
> 
> From: Shengjiu Wang <shengjiu.wang@nxp.com>
> 
> Both fsl_asrc_probe() and fsl_easrc_probe() call fsl_asrc_m2m_init()
> near the end of their probe functions. On failure, the original code
> did a bare return ret, bypassing the existing error labels that call
> pm_runtime_disable(). This leaves runtime PM enabled and the device
> in an inconsistent state after a failed probe.
> 
> [...]

Applied to

   https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git for-7.2

Thanks!

[1/2] ASoC: fsl_asrc: fix m2m_init error path to use goto instead of bare return
      https://git.kernel.org/broonie/sound/c/890b4253134f
[2/2] ASoC: fsl_easrc: fix m2m_init error path to use goto instead of bare return
      https://git.kernel.org/broonie/sound/c/a54bc0eef90e

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