Skip to content

Commit 9e630ef

Browse files
ZhangShurongbroonie
authored andcommitted
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: 955ac62 ("ASoC: fsl_easrc: Add EASRC ASoC CPU DAI drivers") Signed-off-by: Zhang Shurong <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Mark Brown <[email protected]>
1 parent e8ecffd commit 9e630ef

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

sound/soc/fsl/fsl_easrc.c

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1966,17 +1966,21 @@ static int fsl_easrc_probe(struct platform_device *pdev)
19661966
&fsl_easrc_dai, 1);
19671967
if (ret) {
19681968
dev_err(dev, "failed to register ASoC DAI\n");
1969-
return ret;
1969+
goto err_pm_disable;
19701970
}
19711971

19721972
ret = devm_snd_soc_register_component(dev, &fsl_asrc_component,
19731973
NULL, 0);
19741974
if (ret) {
19751975
dev_err(&pdev->dev, "failed to register ASoC platform\n");
1976-
return ret;
1976+
goto err_pm_disable;
19771977
}
19781978

19791979
return 0;
1980+
1981+
err_pm_disable:
1982+
pm_runtime_disable(&pdev->dev);
1983+
return ret;
19801984
}
19811985

19821986
static void fsl_easrc_remove(struct platform_device *pdev)

0 commit comments

Comments
 (0)