diff mbox series

[2/2] ASoC: fsl_aud2htx: Add error handler for pm_runtime_enable

Message ID 1661430460-5234-2-git-send-email-shengjiu.wang@nxp.com (mailing list archive)
State Accepted
Commit b1cd3fd42db7593a2d24c06f1c53b8c886592080
Headers show
Series [1/2] ASoC: fsl_aud2htx: register platform component before registering cpu dai | expand

Commit Message

Shengjiu Wang Aug. 25, 2022, 12:27 p.m. UTC
Call pm_runtime_disable() when error happens in probe()

Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com>
---
 sound/soc/fsl/fsl_aud2htx.c | 2 ++
 1 file changed, 2 insertions(+)
diff mbox series

Patch

diff --git a/sound/soc/fsl/fsl_aud2htx.c b/sound/soc/fsl/fsl_aud2htx.c
index bc1b9c6df95c..1e421d9a03fb 100644
--- a/sound/soc/fsl/fsl_aud2htx.c
+++ b/sound/soc/fsl/fsl_aud2htx.c
@@ -241,6 +241,7 @@  static int fsl_aud2htx_probe(struct platform_device *pdev)
 	ret = devm_snd_dmaengine_pcm_register(&pdev->dev, NULL, 0);
 	if (ret) {
 		dev_err(&pdev->dev, "failed to pcm register\n");
+		pm_runtime_disable(&pdev->dev);
 		return ret;
 	}
 
@@ -249,6 +250,7 @@  static int fsl_aud2htx_probe(struct platform_device *pdev)
 					      &fsl_aud2htx_dai, 1);
 	if (ret) {
 		dev_err(&pdev->dev, "failed to register ASoC DAI\n");
+		pm_runtime_disable(&pdev->dev);
 		return ret;
 	}