-
Lars-Peter Clausen authored
The tmag5273 gets a runtime PM reference before reading a measurement and releases it when done. But if the measurement fails the tmag5273_read_raw() function exits before releasing the reference. Make sure that this error path also releases the runtime PM reference. Fixes: 866a1389 ("iio: magnetometer: add ti tmag5273 driver") Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Acked-by: Gerald Loacker <gerald.loacker@wolfvision.net> Reviewed-by: Nuno Sa <nuno.sa@analog.com> Link: https://lore.kernel.org/r/20230414013752.498767-1-lars@metafoo.de Cc: <Stable@vger.kernel.org> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
265c82ea