Skip to contentSkip to conversation

ASoC: fsl_mqs: call pm_runtime_disable() on error path

PATCH In review Liliang Ye 2 participants 2 messages Apr 3, 2023 – Apr 17, 2023

Subsystems (3)
lore
Share & tools
lore

Liliang Ye

author
#0 lore raw

PATCH 2/2 ASoC: fsl_mqs: call pm_runtime_disable() on error path

pm_runtime_disable was missed in cleanup operation, which corresponds to the earlier call to pm_runtime_enable.

To fix this, add pm_runtime_disable() on error path.

Fixes 9e28f6532c61 ("ASoC: fsl_mqs: Add MQS component driver")
---
 sound/soc/fsl/fsl_mqs.c | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)
sound/soc/fsl/fsl_mqs.c +5 -1
index 32d20d351bbf..129d426c60c4 100644
@@ -251,9 +251,13 @@ 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 int fsl_mqs_remove(struct platform_device *pdev)
Signature · 1 line
2.34.1
maintainer
#1 lore raw
Quoted 2 lines · Liliang Ye

pm_runtime_disable was missed in cleanup operation, which corresponds to the earlier call to pm_runtime_enable.

This doesn't apply against current code, please check and resend.