Commit b1cd3fd4 authored by Shengjiu Wang's avatar Shengjiu Wang Committed by Mark Brown

ASoC: fsl_aud2htx: Add error handler for pm_runtime_enable

Call pm_runtime_disable() when error happens in probe()
Signed-off-by: default avatarShengjiu Wang <shengjiu.wang@nxp.com>
Link: https://lore.kernel.org/r/1661430460-5234-2-git-send-email-shengjiu.wang@nxp.comSigned-off-by: default avatarMark Brown <broonie@kernel.org>
parent ea532c29
...@@ -241,6 +241,7 @@ static int fsl_aud2htx_probe(struct platform_device *pdev) ...@@ -241,6 +241,7 @@ static int fsl_aud2htx_probe(struct platform_device *pdev)
ret = devm_snd_dmaengine_pcm_register(&pdev->dev, NULL, 0); ret = devm_snd_dmaengine_pcm_register(&pdev->dev, NULL, 0);
if (ret) { if (ret) {
dev_err(&pdev->dev, "failed to pcm register\n"); dev_err(&pdev->dev, "failed to pcm register\n");
pm_runtime_disable(&pdev->dev);
return ret; return ret;
} }
...@@ -249,6 +250,7 @@ static int fsl_aud2htx_probe(struct platform_device *pdev) ...@@ -249,6 +250,7 @@ static int fsl_aud2htx_probe(struct platform_device *pdev)
&fsl_aud2htx_dai, 1); &fsl_aud2htx_dai, 1);
if (ret) { if (ret) {
dev_err(&pdev->dev, "failed to register ASoC DAI\n"); dev_err(&pdev->dev, "failed to register ASoC DAI\n");
pm_runtime_disable(&pdev->dev);
return ret; return ret;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment