Skip to content

Commit

Permalink
ASoC: wm8998: Fix PM disable depth imbalance on error
Browse files Browse the repository at this point in the history
[ Upstream commit 193aa0a ]

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: 31833ea ("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>
  • Loading branch information
Zhang Qilong authored and gregkh committed Dec 30, 2020
1 parent 351d001 commit 82162f4
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion sound/soc/codecs/wm8998.c
Expand Up @@ -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,
&soc_component_dev_wm8998,
Expand All @@ -1390,6 +1390,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;
}
Expand Down

0 comments on commit 82162f4

Please sign in to comment.