ASoC: wm8994: Fix PM disable depth imbalance on error
authorZhang Qilong <zhangqilong3@huawei.com>
Wed, 11 Nov 2020 04:13:24 +0000 (12:13 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 30 Dec 2020 10:53:07 +0000 (11:53 +0100)
commit351d0015c1bf5977b9aa88c325d8ff56158f762e
treec71f2092f3fa492cc24101d2f32e2686cbe8d5e9
parent8f48a2000249908792c3396648b9b77ec264a71a
ASoC: wm8994: Fix PM disable depth imbalance on error

[ Upstream commit b8161cbe55a1892a19a318eaebbda92438fa708c ]

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: 57e265c8d71fb ("ASoC: wm8994: Move runtime PM init to platform device init")
Signed-off-by: Zhang Qilong <zhangqilong3@huawei.com>
Reviewed-by: Richard Fitzgerald <rf@opensource.cirrus.com>
Link: https://lore.kernel.org/r/20201111041326.1257558-2-zhangqilong3@huawei.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
sound/soc/codecs/wm8994.c