media: exynos4-is: Fix several reference count leaks due to pm_runtime_get_sync
authorQiushi Wu <wu000273@umn.edu>
Sun, 14 Jun 2020 03:18:29 +0000 (05:18 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 29 Oct 2020 09:08:18 +0000 (10:08 +0100)
commite7997018b45d69cd61341f6a47bd22b502e5d7e2
tree63bc2c194f797480c42af35e75da25893a67f34d
parent30f5c4e91d142b73ef47de4e699b399ffde58b46
media: exynos4-is: Fix several reference count leaks due to pm_runtime_get_sync

[ Upstream commit 7ef64ceea0008c17e94a8a2c60c5d6d46f481996 ]

On calling pm_runtime_get_sync() the reference count of the device
is incremented. In case of failure, decrement the
reference count before returning the error.

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/exynos4-is/fimc-isp.c
drivers/media/platform/exynos4-is/fimc-lite.c