Skip to content

Commit e94944d

Browse files
andy-shevjic23
authored andcommitted
iio: magnetometer: ak8975: Add missed pm_runtime_put_autosuspend() call
On the failure in the ak8975_read_axis() the PM runtime gets unbalanced. Balance it by calling pm_runtime_put_autosuspend() on error path as well. Fixes: cde4cb5 ("iio: magn: ak8975: deploy runtime and system PM") Reported-by: Sashiko <sashiko-bot@kernel.org> Closes: https://sashiko.dev/#/patchset/20260505-magnetometer-fixes-v5-0-831b9b5550fc%40gmail.com Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Joshua Crofts <joshua.crofts1@gmail.com> Cc: <Stable@vger.kernel.org> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
1 parent 67f4f2b commit e94944d

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

drivers/iio/magnetometer/ak8975.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -784,6 +784,7 @@ static int ak8975_read_axis(struct iio_dev *indio_dev, int index, int *val)
784784

785785
exit:
786786
mutex_unlock(&data->lock);
787+
pm_runtime_put_autosuspend(&data->client->dev);
787788
dev_err(&client->dev, "Error in reading axis\n");
788789
return ret;
789790
}

0 commit comments

Comments
 (0)