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)
committerMauro Carvalho Chehab <mchehab+huawei@kernel.org>
Sun, 27 Sep 2020 08:55:09 +0000 (10:55 +0200)
commitc47f7c779ef0458a58583f00c9ed71b7f5a4d0a2
treec2e5587c5eb4034e21254a4b818b6e9a50aa0bc5
parent64157b2cb1940449e7df2670e85781c690266588
media: exynos4-is: Fix a reference count leak due to pm_runtime_get_sync

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