]> git.baikalelectronics.ru Git - kernel.git/commit
iio: light: rpr0521: Balance runtime pm + use pm_runtime_resume_and_get()
authorJonathan Cameron <Jonathan.Cameron@huawei.com>
Sun, 9 May 2021 11:33:36 +0000 (12:33 +0100)
committerJonathan Cameron <Jonathan.Cameron@huawei.com>
Mon, 17 May 2021 12:54:27 +0000 (13:54 +0100)
commit52376dda940d79d81a56930df06202c115ff39d6
tree09b1c075accdbb934e6185fd880bc0ef3461a368
parent4dab41c138f834350794452c3c7505a078ec0fe9
iio: light: rpr0521: Balance runtime pm + use pm_runtime_resume_and_get()

Calls to pm_runtime_put_noidle in probe() error path and remove() are
not match to any get() calls.

The runtime pm core protects against negative reference counts, so this
doesn't have any visible impact beyond confusing the reader.

Whilst here use pm_runtime_resume_and_get() to replace boilerplate.

Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Cc: Mikko Koivunen <mikko.koivunen@fi.rohmeurope.com>
Reviewed-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
Link: https://lore.kernel.org/r/20210509113354.660190-11-jic23@kernel.org
drivers/iio/light/rpr0521.c