linux-stable/drivers/media/platform/ti-vpe
Qiushi Wu 0cb5c9607f media: ti-vpe: Fix a missing check and reference count leak
[ Upstream commit 7dae2aaaf4 ]

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.
And also, when the call of function vpe_runtime_get() failed,
we won't call vpe_runtime_put().
Thus call pm_runtime_put_noidle() if pm_runtime_get_sync() fails
inside vpe_runtime_get().

Fixes: 4571912743 ("[media] v4l: ti-vpe: Add VPE mem to mem driver")
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>
2020-10-29 09:07:02 +01:00
..
cal.c media: ti-vpe: cal: Restrict DMA to avoid memory corruption 2020-10-01 13:12:31 +02:00
cal_regs.h
csc.c
csc.h
Makefile
sc.c
sc.h
sc_coeff.h
vpdma.c
vpdma.h media: ti-vpe: vpe: fix a v4l2-compliance failure about invalid sizeimage 2019-12-31 12:37:06 +01:00
vpdma_priv.h
vpe.c media: ti-vpe: Fix a missing check and reference count leak 2020-10-29 09:07:02 +01:00
vpe_regs.h