ASoC: pcm512x: Fix PM disable depth imbalance in pcm512x_probe
authorZhang Qilong <zhangqilong3@huawei.com>
Wed, 28 Sep 2022 16:04:02 +0000 (00:04 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 31 Dec 2022 12:14:14 +0000 (13:14 +0100)
commit09fe3b1392688cb22f8704f6a255a2f9e90af6a8
treeb8e84560ab2b569e9d42630993af4d0354e96559
parent8876793e56ec69b3be2a883b4bc440df3dbb1865
ASoC: pcm512x: Fix PM disable depth imbalance in pcm512x_probe

[ Upstream commit 97b801be6f8e53676b9f2b105f54e35c745c1b22 ]

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 going to
err_pm instead of err_clk.

Fixes:f086ba9d5389c ("ASoC: pcm512x: Support mastering BCLK/LRCLK using the PLL")

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