WSL2-Linux-Kernel/drivers/media/platform/exynos-gsc
Mauro Carvalho Chehab 59087b66ea media: exynos-gsc: fix pm_runtime_get_sync() usage count
The pm_runtime_get_sync() internally increments the
dev->power.usage_count without decrementing it, even on errors.
Replace it by the new pm_runtime_resume_and_get(), introduced by:
commit dd8088d5a8 ("PM: runtime: Add pm_runtime_resume_and_get to deal with usage counter")
in order to properly decrement the usage counter, avoiding
a potential PM usage counter leak.

As a bonus, as pm_runtime_get_sync() always return 0 on
success, the logic can be simplified.

Reviewed-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Reviewed-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
2021-05-10 11:36:34 +02:00
..
Makefile treewide: Add SPDX license identifier - Makefile/Kconfig 2019-05-21 10:50:46 +02:00
gsc-core.c media: exynos-gsc: don't resume at remove time 2021-05-10 11:36:33 +02:00
gsc-core.h media: exynos-gsc/gsc-core.h: fix kernel-doc warnings 2021-04-06 10:28:45 +02:00
gsc-m2m.c media: exynos-gsc: fix pm_runtime_get_sync() usage count 2021-05-10 11:36:34 +02:00
gsc-regs.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 152 2019-05-30 11:26:32 -07:00
gsc-regs.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 500 2019-06-19 17:09:55 +02:00