summaryrefslogtreecommitdiff
path: root/sound
diff options
context:
space:
mode:
authorShengjiu Wang <shengjiu.wang@nxp.com>2022-08-25 15:27:40 +0300
committerMark Brown <broonie@kernel.org>2022-08-25 16:17:31 +0300
commitb1cd3fd42db7593a2d24c06f1c53b8c886592080 (patch)
treeb72b89bba9a74a52d63600570134a305069dde2c /sound
parentea532c29972df96fda20393d9bf057e898f5e965 (diff)
downloadlinux-b1cd3fd42db7593a2d24c06f1c53b8c886592080.tar.xz
ASoC: fsl_aud2htx: Add error handler for pm_runtime_enable
Call pm_runtime_disable() when error happens in probe() Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com> Link: https://lore.kernel.org/r/1661430460-5234-2-git-send-email-shengjiu.wang@nxp.com Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'sound')
-rw-r--r--sound/soc/fsl/fsl_aud2htx.c2
1 files changed, 2 insertions, 0 deletions
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;
}