diff mbox series

[v2,4/4] ASoC: wm8998: Fix PM disable depth imbalance on error

Message ID 20201111130923.220186-5-zhangqilong3@huawei.com (mailing list archive)
State New, archived
Headers show
Series ASoC: Fix error handling in wm899x | expand

Commit Message

Zhang Qilong Nov. 11, 2020, 1:09 p.m. UTC
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.

Fixes: 31833ead95c2c ("ASoC: arizona: Move request of speaker IRQs into bus probe")
Signed-off-by: Zhang Qilong <zhangqilong3@huawei.com>
Reviewed-by: Richard Fitzgerald <rf@opensource.cirrus.com>
 sound/soc/codecs/wm8998.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
diff mbox series


diff --git a/sound/soc/codecs/wm8998.c b/sound/soc/codecs/wm8998.c
index f6c5cc80c970..5413254295b7 100644
--- a/sound/soc/codecs/wm8998.c
+++ b/sound/soc/codecs/wm8998.c
@@ -1375,7 +1375,7 @@  static int wm8998_probe(struct platform_device *pdev)
 	ret = arizona_init_spk_irqs(arizona);
 	if (ret < 0)
-		return ret;
+		goto err_pm_disable;
 	ret = devm_snd_soc_register_component(&pdev->dev,
@@ -1390,6 +1390,8 @@  static int wm8998_probe(struct platform_device *pdev)
+	pm_runtime_disable(&pdev->dev);
 	return ret;