Commit 193aa0a0 authored by Zhang Qilong's avatar Zhang Qilong Committed by Mark Brown

ASoC: wm8998: Fix PM disable depth imbalance on error

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: 31833ead ("ASoC: arizona: Move request of speaker IRQs into bus probe")
Signed-off-by: default avatarZhang Qilong <zhangqilong3@huawei.com>
Reviewed-by: default avatarRichard Fitzgerald <rf@opensource.cirrus.com>
Link: https://lore.kernel.org/r/20201111041326.1257558-4-zhangqilong3@huawei.comSigned-off-by: default avatarMark Brown <broonie@kernel.org>
parent b8161cbe
...@@ -1375,7 +1375,7 @@ static int wm8998_probe(struct platform_device *pdev) ...@@ -1375,7 +1375,7 @@ static int wm8998_probe(struct platform_device *pdev)
ret = arizona_init_spk_irqs(arizona); ret = arizona_init_spk_irqs(arizona);
if (ret < 0) if (ret < 0)
return ret; goto err_pm_disable;
ret = devm_snd_soc_register_component(&pdev->dev, ret = devm_snd_soc_register_component(&pdev->dev,
&soc_component_dev_wm8998, &soc_component_dev_wm8998,
...@@ -1390,6 +1390,8 @@ static int wm8998_probe(struct platform_device *pdev) ...@@ -1390,6 +1390,8 @@ static int wm8998_probe(struct platform_device *pdev)
err_spk_irqs: err_spk_irqs:
arizona_free_spk_irqs(arizona); arizona_free_spk_irqs(arizona);
err_pm_disable:
pm_runtime_disable(&pdev->dev);
return ret; return ret;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment