Home
last modified time | relevance | path

Searched hist:dd97908e (Results 1 – 1 of 1) sorted by relevance

/openbmc/linux/drivers/media/platform/atmel/
H A Datmel-isi.cdd97908e Fri Apr 23 09:47:42 CDT 2021 Mauro Carvalho Chehab <mchehab+huawei@kernel.org> media: atmel: properly get pm_runtime

There are several issues in the way the atmel driver handles
pm_runtime_get_sync():

- it doesn't check return codes;
- it doesn't properly decrement the usage_count on all places;
- it starts streaming even if pm_runtime_get_sync() fails.
- while it tries to get pm_runtime at the clock enable logic,
it doesn't check if the operation was suceeded.

Replace all occurrences of it to use the new kAPI:
pm_runtime_resume_and_get(), which ensures that, if the
return code is not negative, the usage_count was incremented.

With that, add additional checks when this is called, in order
to ensure that errors will be properly addressed.

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