]> git.proxmox.com Git - mirror_ubuntu-focal-kernel.git/commit
ASoC: img: Fix a reference count leak in img_i2s_in_set_fmt
authorQiushi Wu <wu000273@umn.edu>
Sun, 14 Jun 2020 03:37:48 +0000 (22:37 -0500)
committerKhalid Elmously <khalid.elmously@canonical.com>
Wed, 16 Sep 2020 09:15:01 +0000 (05:15 -0400)
commit3616d3272a010ac0ac3f744ae49d11b21fea87d5
tree991530884897ccb101ffd4d1f36621d50b5d57ff
parent2faa6dc03c9ffc0fadd63b7f49222a8aa51c21bb
ASoC: img: Fix a reference count leak in img_i2s_in_set_fmt

BugLink: https://bugs.launchpad.net/bugs/1895174
[ Upstream commit c4c59b95b7f7d4cef5071b151be2dadb33f3287b ]

pm_runtime_get_sync() increments the runtime PM usage counter even
when it returns an error code, causing incorrect ref count if
pm_runtime_put_noidle() is not called in error handling paths.
Thus call pm_runtime_put_noidle() if pm_runtime_get_sync() fails.

Signed-off-by: Qiushi Wu <wu000273@umn.edu>
Link: https://lore.kernel.org/r/20200614033749.2975-1-wu000273@umn.edu
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
Signed-off-by: Khalid Elmously <khalid.elmously@canonical.com>
sound/soc/img/img-i2s-in.c