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
gsc-core.c media: exynos-gsc: don't resume at remove time 2021-05-10 11:36:33 +02:00
gsc-core.h
gsc-m2m.c media: exynos-gsc: fix pm_runtime_get_sync() usage count 2021-05-10 11:36:34 +02:00
gsc-regs.c
gsc-regs.h