linux/drivers/media/platform/exynos4-is
Mauro Carvalho Chehab 59f96244af media: exynos4-is: 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.

On some places, this is ok, but on others the usage count
ended being unbalanced on failures.

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, such function always return zero on success. So,
some code can be simplified.

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
..
common.c media updates for v5.3-rc1 2019-07-09 09:47:22 -07:00
common.h media updates for v5.3-rc1 2019-07-09 09:47:22 -07:00
fimc-capture.c media: exynos4-is: fix pm_runtime_get_sync() usage count 2021-05-10 11:36:34 +02:00
fimc-core.c media: platform: exynos4-is: remove all references to physical addresses 2020-12-03 07:49:16 +01:00
fimc-core.h media: exynos4-is: fix kernel-doc warnings 2021-04-06 10:29:08 +02:00
fimc-is-command.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 500 2019-06-19 17:09:55 +02:00
fimc-is-errno.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 500 2019-06-19 17:09:55 +02:00
fimc-is-errno.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 500 2019-06-19 17:09:55 +02:00
fimc-is-i2c.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 500 2019-06-19 17:09:55 +02:00
fimc-is-i2c.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 500 2019-06-19 17:09:55 +02:00
fimc-is-param.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 500 2019-06-19 17:09:55 +02:00
fimc-is-param.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 500 2019-06-19 17:09:55 +02:00
fimc-is-regs.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 500 2019-06-19 17:09:55 +02:00
fimc-is-regs.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 500 2019-06-19 17:09:55 +02:00
fimc-is-sensor.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 500 2019-06-19 17:09:55 +02:00
fimc-is-sensor.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 500 2019-06-19 17:09:55 +02:00
fimc-is.c media: exynos4-is: fix pm_runtime_get_sync() usage count 2021-05-10 11:36:34 +02:00
fimc-is.h media: exynos4-is: Fix kernel-doc entries in fimc-is.h 2021-04-06 19:35:48 +02:00
fimc-isp-video.c media: exynos4-is: fix pm_runtime_get_sync() usage count 2021-05-10 11:36:34 +02:00
fimc-isp-video.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 500 2019-06-19 17:09:55 +02:00
fimc-isp.c media: exynos4-is: fix pm_runtime_get_sync() usage count 2021-05-10 11:36:34 +02:00
fimc-isp.h media: exynos4-is: fix kernel-doc warnings 2021-04-06 10:29:08 +02:00
fimc-lite-reg.c media: platform: exynos4-is: remove all references to physical addresses 2020-12-03 07:49:16 +01:00
fimc-lite-reg.h media: use the BIT() macro 2019-08-26 14:08:50 -03:00
fimc-lite.c media: exynos4-is: fix pm_runtime_get_sync() usage count 2021-05-10 11:36:34 +02:00
fimc-lite.h media: exynos4-is: fix kernel-doc warnings 2021-04-06 10:29:08 +02:00
fimc-m2m.c media: exynos4-is: fix pm_runtime_get_sync() usage count 2021-05-10 11:36:34 +02:00
fimc-reg.c media: platform: exynos4-is: remove all references to physical addresses 2020-12-03 07:49:16 +01:00
fimc-reg.h media: exynos4-is: fix kernel-doc warnings 2021-04-06 10:29:08 +02:00
Kconfig media: Kconfig files: use select for V4L2 subdevs and MC 2020-04-14 10:29:05 +02:00
Makefile License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
media-dev.c media: exynos4-is: fix pm_runtime_get_sync() usage count 2021-05-10 11:36:34 +02:00
media-dev.h media: exynos4-is: fix kernel-doc warnings 2021-04-06 10:29:08 +02:00
mipi-csis.c media: exynos4-is: fix pm_runtime_get_sync() usage count 2021-05-10 11:36:34 +02:00
mipi-csis.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 500 2019-06-19 17:09:55 +02:00