]> git.baikalelectronics.ru Git - kernel.git/commit
ASoC: wm5102: Fix PM disable depth imbalance in wm5102_probe
authorZhang Qilong <zhangqilong3@huawei.com>
Wed, 28 Sep 2022 16:01:15 +0000 (00:01 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 26 Oct 2022 11:22:31 +0000 (13:22 +0200)
commite9c347e517ab432d544a1c5e1ab431346743158f
tree738831f934f1d89619518fb80e454e07b5249d4b
parentc9bc3dd5646caaa814c321a6624f2c0069f1d256
ASoC: wm5102: Fix PM disable depth imbalance in wm5102_probe

[ Upstream commit 563320d08aa7f5dae6f8e53541ae61ea9616cfa6 ]

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. We fix it by moving
pm_runtime_enable to the endding of wm5102_probe.

Fixes:b4ee9573a5152 ("ASoC: wm5102: Initial driver")

Signed-off-by: Zhang Qilong <zhangqilong3@huawei.com>
Link: https://lore.kernel.org/r/20220928160116.125020-4-zhangqilong3@huawei.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
sound/soc/codecs/wm5102.c