]> git.baikalelectronics.ru Git - kernel.git/commit
ASoC: rockchip: Fix a reference count leak.
authorQiushi Wu <wu000273@umn.edu>
Sat, 13 Jun 2020 20:51:58 +0000 (15:51 -0500)
committerMark Brown <broonie@kernel.org>
Thu, 18 Jun 2020 16:21:58 +0000 (17:21 +0100)
commit1fe19d9c99aaa2d6937c1354229d41d189c468a8
tree8125facb9630eb9ffad68503be8a1a753c37cf97
parent2f4fd70a1c54d483390a10f02df4f1e84026e284
ASoC: rockchip: Fix a reference count leak.

Calling pm_runtime_get_sync increments the counter even in case of
failure, causing incorrect ref count if pm_runtime_put is not called in
error handling paths. Call pm_runtime_put if pm_runtime_get_sync fails.

Fixes: 77b0ecd79e09 ("ASoC: rockchip: add support for pdm controller")
Signed-off-by: Qiushi Wu <wu000273@umn.edu>
Reviewed-by: Heiko Stuebner <heiko@sntech.de>
Link: https://lore.kernel.org/r/20200613205158.27296-1-wu000273@umn.edu
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/rockchip/rockchip_pdm.c