summaryrefslogtreecommitdiffstats
path: root/sound/soc/fsl/fsl_easrc.c
diff options
context:
space:
mode:
authorZhang Shurong <zhang_shurong@foxmail.com>2023-10-12 15:03:15 +0200
committerMark Brown <broonie@kernel.org>2023-10-23 14:27:13 +0200
commit9e630efb5a4af56fdb15aa10405f5cfd3f5f5b83 (patch)
tree98646dd41b96eea7d722eeee72001515af173162 /sound/soc/fsl/fsl_easrc.c
parentASoC: da7219: Correct the process of setting up Gnd switch in AAD (diff)
downloadlinux-9e630efb5a4af56fdb15aa10405f5cfd3f5f5b83.tar.xz
linux-9e630efb5a4af56fdb15aa10405f5cfd3f5f5b83.zip
ASoC: fsl: Fix PM disable depth imbalance in fsl_easrc_probe
The pm_runtime_enable will increase power disable depth. Thus a pairing decrement is needed on the error handling path to keep it balanced according to context. We fix it by calling pm_runtime_disable when error returns. Fixes: 955ac624058f ("ASoC: fsl_easrc: Add EASRC ASoC CPU DAI drivers") Signed-off-by: Zhang Shurong <zhang_shurong@foxmail.com> Link: https://lore.kernel.org/r/tencent_C0D62E6D89818179A02A04A0C248F0DDC40A@qq.com Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'sound/soc/fsl/fsl_easrc.c')
-rw-r--r--sound/soc/fsl/fsl_easrc.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/sound/soc/fsl/fsl_easrc.c b/sound/soc/fsl/fsl_easrc.c
index ba62995c909a..ec53bda46a46 100644
--- a/sound/soc/fsl/fsl_easrc.c
+++ b/sound/soc/fsl/fsl_easrc.c
@@ -1966,17 +1966,21 @@ static int fsl_easrc_probe(struct platform_device *pdev)
&fsl_easrc_dai, 1);
if (ret) {
dev_err(dev, "failed to register ASoC DAI\n");
- return ret;
+ goto err_pm_disable;
}
ret = devm_snd_soc_register_component(dev, &fsl_asrc_component,
NULL, 0);
if (ret) {
dev_err(&pdev->dev, "failed to register ASoC platform\n");
- return ret;
+ goto err_pm_disable;
}
return 0;
+
+err_pm_disable:
+ pm_runtime_disable(&pdev->dev);
+ return ret;
}
static void fsl_easrc_remove(struct platform_device *pdev)