summaryrefslogtreecommitdiffstats
path: root/drivers/media/cec/platform
diff options
context:
space:
mode:
authorMauro Carvalho Chehab <mchehab+huawei@kernel.org>2021-04-23 17:03:23 +0200
committerMauro Carvalho Chehab <mchehab+huawei@kernel.org>2021-05-10 11:36:33 +0200
commit220955ec3c84505ec6a75bea494ec61f5295ef7a (patch)
tree28517ce93ffb89c12c5cb1987e992e03033d6dd9 /drivers/media/cec/platform
parent45e75a8c6fa455a5909ac04db76a4b15d6bb8368 (diff)
downloadlinux-220955ec3c84505ec6a75bea494ec61f5295ef7a.tar.bz2
media: renesas-ceu: Properly check for PM errors
Right now, the driver just assumes that PM runtime resume worked, but it may fail. Well, the pm_runtime_get_sync() internally increments the dev->power.usage_count without decrementing it, even on errors. So, using it is tricky. Let's replace it by the new pm_runtime_resume_and_get(), introduced by: commit dd8088d5a896 ("PM: runtime: Add pm_runtime_resume_and_get to deal with usage counter") and return an error if something bad happens. This should ensure that the PM runtime usage_count will be properly decremented if an error happens at open time. Reviewed-by: Jonathan Cameron <Jonathan.Cameron@huawei.com> Acked-by: Jacopo Mondi <jacopo@jmondi.org> Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
Diffstat (limited to 'drivers/media/cec/platform')
0 files changed, 0 insertions, 0 deletions