[PATCH 2/2] ASoC: fsl_mqs: Disable runtime PM on probe failure
From: Chancel Liu
Date: Sun Nov 29 2026 - 20:55:35 EST
From: Chancel Liu <chancel.liu@xxxxxxx>
Disable runtime PM if the ASoC component registration fails to keep the
probe error path balanced.
Signed-off-by: Chancel Liu <chancel.liu@xxxxxxx>
---
sound/soc/fsl/fsl_mqs.c | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/sound/soc/fsl/fsl_mqs.c b/sound/soc/fsl/fsl_mqs.c
index ce12cc79b9c4..b171120952aa 100644
--- a/sound/soc/fsl/fsl_mqs.c
+++ b/sound/soc/fsl/fsl_mqs.c
@@ -312,9 +312,14 @@ static int fsl_mqs_probe(struct platform_device *pdev)
ret = devm_snd_soc_register_component(&pdev->dev, &soc_codec_fsl_mqs,
&fsl_mqs_dai, 1);
if (ret)
- return ret;
+ goto err_pm_disable;
return 0;
+
+err_pm_disable:
+ pm_runtime_disable(&pdev->dev);
+
+ return ret;
}
static void fsl_mqs_remove(struct platform_device *pdev)
--
2.50.1