]> git.proxmox.com Git - mirror_ubuntu-jammy-kernel.git/commit
media: stm32-dcmi: Fix a reference count leak
authorQiushi Wu <wu000273@umn.edu>
Sun, 14 Jun 2020 02:36:59 +0000 (04:36 +0200)
committerMauro Carvalho Chehab <mchehab+huawei@kernel.org>
Sun, 27 Sep 2020 08:53:52 +0000 (10:53 +0200)
commit88f50a05f907d96a27a9ce3cc9e8cbb91a6f0f22
tree57b67c2013aceb745c0790163981bd087449097d
parent78741ce98c2e36188e2343434406b0e0bc50b0e7
media: stm32-dcmi: Fix a reference count leak

Calling pm_runtime_get_sync increments the counter even in case of
failure, causing incorrect ref count if pm_runtime_put is not
called in error handling paths. Thus replace the jump target
"err_release_buffers" by "err_pm_putw".

Fixes: 152e0bf60219 ("media: stm32-dcmi: add power saving support")
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/stm32/stm32-dcmi.c