media: exynos4-is: Fix a reference count leak due to pm_runtime_get_sync
authorQiushi Wu <wu000273@umn.edu>
Sun, 14 Jun 2020 03:10:58 +0000 (05:10 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 29 Oct 2020 08:05:42 +0000 (09:05 +0100)
commit6e8429c2946fd179c27a165aca9f2ab6aea2ae1d
treee53987ff515e13e7738897e513d8273e24579689
parent3450996789e5d8c09a3feecbaf265ba6d25a3ee0
media: exynos4-is: Fix a reference count leak due to pm_runtime_get_sync

[ Upstream commit c47f7c779ef0458a58583f00c9ed71b7f5a4d0a2 ]

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/media-dev.c