linux_dsm_epyc7002/drivers/gpu/drm/tegra
Qinglang Miao 0cdfdd1f03 drm/tegra: Fix reference leak when pm_runtime_get_sync() fails
[ Upstream commit dcdfe2712b68f1e9dbf4f1a96ad59b80e5cc0ef7 ]

The PM reference count is not expected to be incremented on return in
these Tegra functions.

However, pm_runtime_get_sync() will increment the PM reference count
even on failure. Forgetting to put the reference again will result in
a leak.

Replace it with pm_runtime_resume_and_get() to keep the usage counter
balanced.

Fixes: fd67e9c6ed ("drm/tegra: Do not implement runtime PM")
Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: Qinglang Miao <miaoqinglang@huawei.com>
Signed-off-by: Thierry Reding <treding@nvidia.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2021-03-04 11:37:42 +01:00
..
dc.c drm/tegra: Fix reference leak when pm_runtime_get_sync() fails 2021-03-04 11:37:42 +01:00
dc.h
dp.c
dp.h
dpaux.c
dpaux.h
drm.c drm/tegra: replace idr_init() by idr_init_base() 2020-11-10 20:49:57 +01:00
drm.h
dsi.c drm/tegra: Fix reference leak when pm_runtime_get_sync() fails 2021-03-04 11:37:42 +01:00
dsi.h
falcon.c
falcon.h
fb.c
gem.c
gem.h
gr2d.c
gr2d.h
gr3d.c
gr3d.h
hda.c
hda.h
hdmi.c drm/tegra: Fix reference leak when pm_runtime_get_sync() fails 2021-03-04 11:37:42 +01:00
hdmi.h
hub.c drm/tegra: Fix reference leak when pm_runtime_get_sync() fails 2021-03-04 11:37:42 +01:00
hub.h
Kconfig
Makefile
mipi-phy.c
mipi-phy.h
output.c drm/tegra: output: Do not put OF node twice 2020-11-13 21:38:35 +01:00
plane.c
plane.h
rgb.c
sor.c drm/tegra: Fix reference leak when pm_runtime_get_sync() fails 2021-03-04 11:37:42 +01:00
sor.h
trace.c
trace.h
vic.c drm/tegra: Fix reference leak when pm_runtime_get_sync() fails 2021-03-04 11:37:42 +01:00
vic.h