From: Chancel Liu <[email protected]> Disable runtime PM if the ASoC component registration fails to keep the probe error path balanced.
Signed-off-by: Chancel Liu <[email protected]> --- sound/soc/fsl/fsl_mqs.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/sound/soc/fsl/fsl_mqs.c b/sound/soc/fsl/fsl_mqs.c index ce12cc79b9c4..b171120952aa 100644 --- a/sound/soc/fsl/fsl_mqs.c +++ b/sound/soc/fsl/fsl_mqs.c @@ -312,9 +312,14 @@ static int fsl_mqs_probe(struct platform_device *pdev) ret = devm_snd_soc_register_component(&pdev->dev, &soc_codec_fsl_mqs, &fsl_mqs_dai, 1); if (ret) - return ret; + goto err_pm_disable; return 0; + +err_pm_disable: + pm_runtime_disable(&pdev->dev); + + return ret; } static void fsl_mqs_remove(struct platform_device *pdev) -- 2.50.1
