ASoC: fsl_asrc: fix m2m_init error path to use goto instead of bare return

When fsl_asrc_m2m_init() fails in fsl_asrc_probe(), the code did a
bare return ret, bypassing pm_runtime_disable() in err_pm_get_sync.
Use goto err_pm_get_sync to ensure proper cleanup on failure.

Fixes: 286d658477 ("ASoC: fsl_asrc: register m2m platform device")
Cc: stable@vger.kernel.org
Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com>
Link: https://patch.msgid.link/20260715024758.1252801-2-shengjiu.wang@oss.nxp.com
Signed-off-by: Mark Brown <broonie@kernel.org>
This commit is contained in:
Shengjiu Wang 2026-07-15 10:47:57 +08:00 committed by Mark Brown
parent 1590cf0329
commit 890b425313
No known key found for this signature in database
GPG Key ID: 24D68B725D5487D0

View File

@ -1419,7 +1419,7 @@ static int fsl_asrc_probe(struct platform_device *pdev)
ret = fsl_asrc_m2m_init(asrc);
if (ret) {
dev_err(&pdev->dev, "failed to init m2m device %d\n", ret);
return ret;
goto err_pm_get_sync;
}
return 0;