mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-07 19:30:30 +09:00
media: exynos4-is: Fix a reference count leak due to pm_runtime_get_sync
[ Upstream commit c47f7c779e ]
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>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
72818356f1
commit
93705ea75c
@@ -481,8 +481,10 @@ static int fimc_md_register_sensor_entities(struct fimc_md *fmd)
|
||||
return -ENXIO;
|
||||
|
||||
ret = pm_runtime_get_sync(fmd->pmf);
|
||||
if (ret < 0)
|
||||
if (ret < 0) {
|
||||
pm_runtime_put(fmd->pmf);
|
||||
return ret;
|
||||
}
|
||||
|
||||
fmd->num_sensors = 0;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user