Re: [PATCH v2 08/17] iio: chemical: atlas-sensor: Discard pm_runtime_put_autosuspend() return values

From: Jonathan Cameron

Date: Sun Oct 25 2026 - 23:27:55 EST


On Wed, 21 Oct 2026 16:57:09 -0700
Brian Norris <briannorris@xxxxxxxxxxxx> wrote:

> The atlas-sensor driver propagates the return value of
> pm_runtime_put_autosuspend(), which is not particularly useful.
>
> Returning an error code from pm_runtime_put_autosuspend() merely means
> that it has not queued up a timer or work item to check whether or not
> the device can be suspended and there are many perfectly valid
> situations in which that can happen, like after writing "on" to the
> device's runtime PM "control" attribute in sysfs for one example.
>
> For this reason, modify this driver to simply discard the
> pm_runtime_put_autosuspend() return value.
>
> This will facilitate a planned change of the
> pm_runtime_put_autosuspend() return type to void in the future, similar
> to commit 3afd8df02433 ("PM: runtime: Change pm_runtime_put() return
> type to void").
>
> Signed-off-by: Brian Norris <briannorris@xxxxxxxxxxxx>
> Reviewed-by: Andy Shevchenko <andriy.shevchenko@xxxxxxxxx>
Applied.

> ---
>
> Changes in v2:
> * Split iio patch into per-driver patches
>
> drivers/iio/chemical/atlas-sensor.c | 4 +---
> 1 file changed, 1 insertion(+), 3 deletions(-)
>
> diff --git a/drivers/iio/chemical/atlas-sensor.c b/drivers/iio/chemical/atlas-sensor.c
> index 1d4a9919df1a..48598475512f 100644
> --- a/drivers/iio/chemical/atlas-sensor.c
> +++ b/drivers/iio/chemical/atlas-sensor.c
> @@ -426,9 +426,7 @@ static int atlas_buffer_predisable(struct iio_dev *indio_dev)
> if (ret)
> return ret;
>
> - ret = pm_runtime_put_autosuspend(&data->client->dev);
> - if (ret)
> - return ret;
> + pm_runtime_put_autosuspend(&data->client->dev);
>
> return 0;
> }