]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
media: st-delta: Fix reference count leak in delta_run_work
authorAditya Pakki <pakki001@umn.edu>
Sun, 14 Jun 2020 03:58:41 +0000 (05:58 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 29 Oct 2020 09:08:18 +0000 (10:08 +0100)
commit236117a8bf3a300048f5ffc8bd6fcd0816745dfb
treef4c2be781a7b567764a089e3627877ce591714b0
parentfe8798e78292d852b3cb598c857a3f04e66522da
media: st-delta: Fix reference count leak in delta_run_work

[ Upstream commit 57cc666d36adc7b45e37ba4cd7bc4e44ec4c43d7 ]

delta_run_work() calls delta_get_sync() that increments
the reference counter. In case of failure, decrement the reference
count by calling delta_put_autosuspend().

Signed-off-by: Aditya Pakki <pakki001@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/delta/delta-v4l2.c