]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
media: sti: Fix reference count leaks
authorQiushi Wu <wu000273@umn.edu>
Sun, 14 Jun 2020 03:31:06 +0000 (05:31 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 30 Oct 2020 09:38:26 +0000 (10:38 +0100)
commitbde69ac535ebacb40a610e2463872cfde24f1aad
tree7829867dbd8d19b9fff4a98918fdbfdfbcc001cf
parent07e82f531e6ad1bac1f28591fa40fc558e1ac7ff
media: sti: Fix reference count leaks

[ Upstream commit 6f4432bae9f2d12fc1815b5e26cc07e69bcad0df ]

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>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/media/platform/sti/hva/hva-hw.c