ASoC: wm8962: Fix runtime PM imbalance on error
authorDinghao Liu <dinghao.liu@zju.edu.cn>
Wed, 27 May 2020 02:46:22 +0000 (10:46 +0800)
committerMark Brown <broonie@kernel.org>
Wed, 27 May 2020 13:48:54 +0000 (14:48 +0100)
commit920bef64cc5fa0e955be357bfc876179729df216
tree3ca8d61b53715a1274f6da4c47c237036f29c879
parent53865b3259554389e40aeead392151c819b52a71
ASoC: wm8962: Fix runtime PM imbalance on error

pm_runtime_get_sync() increments the runtime PM usage counter even
the call returns an error code. Thus a pairing decrement is needed
on the error handling path to keep the counter balanced.

Signed-off-by: Dinghao Liu <dinghao.liu@zju.edu.cn>
Acked-by: Charles Keepax <ckeepax@opensource.cirrus.com>
Link: https://lore.kernel.org/r/20200527024625.9937-1-dinghao.liu@zju.edu.cn
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/codecs/wm8962.c