summaryrefslogtreecommitdiff
path: root/sound/soc
diff options
context:
space:
mode:
authorZhang Qilong <zhangqilong3@huawei.com>2020-11-11 12:13:26 +0800
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2020-12-30 11:25:52 +0100
commitd7b415ebf76c0d1a8dababa06bef595b7acd8260 (patch)
tree48a2bb5f77637b2390141323eefb27fcbbed585d /sound/soc
parentdf06d093baad8fd03a1bd69dc7ac08cb3ffc2659 (diff)
ASoC: wm8998: Fix PM disable depth imbalance on error
[ Upstream commit 193aa0a043645220d2a2f783ba06ae13d4601078 ] 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> Link: https://lore.kernel.org/r/20201111041326.1257558-4-zhangqilong3@huawei.com Signed-off-by: Mark Brown <broonie@kernel.org> Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'sound/soc')
-rw-r--r--sound/soc/codecs/wm8998.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/sound/soc/codecs/wm8998.c b/sound/soc/codecs/wm8998.c
index 61294c787f27..17dc5780ab68 100644
--- a/sound/soc/codecs/wm8998.c
+++ b/sound/soc/codecs/wm8998.c
@@ -1378,7 +1378,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,
&soc_component_dev_wm8998,
@@ -1393,6 +1393,8 @@ static int wm8998_probe(struct platform_device *pdev)
err_spk_irqs:
arizona_free_spk_irqs(arizona);
+err_pm_disable:
+ pm_runtime_disable(&pdev->dev);
return ret;
}