[PATCH 21/78] media: s5p-jpeg: fix pm_runtime_get_sync() usage count

Sylwester Nawrocki s.nawrocki at samsung.com
Tue Apr 27 10:14:36 BST 2021


On 24.04.2021 08:44, Mauro Carvalho Chehab wrote:
> 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:

s/replace/Replace

> commit dd8088d5a896 ("PM: runtime: Add pm_runtime_resume_and_get to deal with usage counter")
> in order to properly decrement the usage counter and avoid memory
> leaks.

Thank you for the patch. I'm not sure if that could cause any memory
leaks, for sure not optimal power handling for the device.

> Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei at kernel.org>

Reviewed-by: Sylwester Nawrocki <s.nawrocki at samsung.com>



More information about the linux-arm-kernel mailing list