]> git.baikalelectronics.ru Git - kernel.git/commit
media: platform: fcp: Fix a reference count leak.
authorQiushi Wu <wu000273@umn.edu>
Sat, 13 Jun 2020 23:19:44 +0000 (01:19 +0200)
committerMauro Carvalho Chehab <mchehab+huawei@kernel.org>
Sun, 27 Sep 2020 08:52:52 +0000 (10:52 +0200)
commit7af36de71f9e48f76615e0079d16d7aa1133588a
treeb56085ec8436cd8cd0f9f3475e433033d9626a17
parent2dbeb0d6bedbe714cda144e494a53257855869c4
media: platform: fcp: Fix a reference count leak.

pm_runtime_get_sync() increments the runtime PM usage counter even
when it returns an error code, causing incorrect ref count if
pm_runtime_put_noidle() is not called in error handling paths.
Thus call pm_runtime_put_noidle() if pm_runtime_get_sync() fails.

Fixes: b6e8f7e42c92 ("[media] v4l: rcar-fcp: Keep the coding style consistent")
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/rcar-fcp.c