iio: temp: mlx90614: Handle failure in pm_runtime_resume_and_get()
authorJonathan Cameron <Jonathan.Cameron@huawei.com>
Sun, 9 May 2021 11:33:50 +0000 (12:33 +0100)
committerJonathan Cameron <Jonathan.Cameron@huawei.com>
Mon, 17 May 2021 12:54:26 +0000 (13:54 +0100)
commit66e748ae7f82301af3b2c2bd0b3bd46d01fd7471
tree9ef17649a9985e35993d44684e31918c3c545029
parent6e4183ec8dfdbce1a48a82d8b8d5648c98d5bfd8
iio: temp: mlx90614: Handle failure in pm_runtime_resume_and_get()

Converts from using pm_runtime_get_sync() with no error handling over
to pm_runtime_resume_and_get() which will ensure we don't end up
holding a reference.  Ensure this error return is then handled at
calls to mlx90614_power_get(). These are all direct returns.

Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Reviewed-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
Link: https://lore.kernel.org/r/20210509113354.660190-25-jic23@kernel.org
drivers/iio/temperature/mlx90614.c