]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
ASoC: fsl: fix m2m_init error path cleanup in fsl_asrc and fsl_easrc
authorMark Brown <broonie@kernel.org>
Sun, 19 Jul 2026 21:25:13 +0000 (22:25 +0100)
committerMark Brown <broonie@kernel.org>
Sun, 19 Jul 2026 21:25:13 +0000 (22:25 +0100)
Shengjiu Wang <shengjiu.wang@nxp.com> says:

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.

Link: https://patch.msgid.link/20260715024758.1252801-1-shengjiu.wang@oss.nxp.com

Trivial merge