From: Shengjiu Wang <[email protected]>

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: 286d658477a4 ("ASoC: fsl_asrc: register m2m platform device")
Cc: [email protected]
Signed-off-by: Shengjiu Wang <[email protected]>
---
 sound/soc/fsl/fsl_asrc.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/sound/soc/fsl/fsl_asrc.c b/sound/soc/fsl/fsl_asrc.c
index 0b28bcfa47fe..df4817ae91b1 100644
--- a/sound/soc/fsl/fsl_asrc.c
+++ b/sound/soc/fsl/fsl_asrc.c
@@ -1413,7 +1413,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;
-- 
2.34.1


Reply via email to