[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20210411161116.5f99195d@jic23-huawei>
Date: Sun, 11 Apr 2021 16:11:51 +0100
From: Jonathan Cameron <jic23@...nel.org>
To: Dinghao Liu <dinghao.liu@....edu.cn>
Cc: kjlu@....edu, Lars-Peter Clausen <lars@...afoo.de>,
Peter Meerwald-Stadler <pmeerw@...erw.net>,
Alexandru Ardelean <alexandru.ardelean@...log.com>,
Matt Ranostay <matt.ranostay@...sulko.com>,
Andy Shevchenko <andy.shevchenko@...il.com>,
linux-iio@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] iio: proximity: pulsedlight: Fix rumtime PM imbalance
on error
On Wed, 7 Apr 2021 12:59:35 +0800
Dinghao Liu <dinghao.liu@....edu.cn> wrote:
> When lidar_write_control() fails, a pairing PM usage counter
> decrement is needed to keep the counter balanced.
>
> Signed-off-by: Dinghao Liu <dinghao.liu@....edu.cn>
Hi, patch content looks good but it needs a fixes tag so we know how far to backport it.
Please add for v2.
Thanks,
Jonathan
> ---
> drivers/iio/proximity/pulsedlight-lidar-lite-v2.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/drivers/iio/proximity/pulsedlight-lidar-lite-v2.c b/drivers/iio/proximity/pulsedlight-lidar-lite-v2.c
> index c685f10b5ae4..cc206bfa09c7 100644
> --- a/drivers/iio/proximity/pulsedlight-lidar-lite-v2.c
> +++ b/drivers/iio/proximity/pulsedlight-lidar-lite-v2.c
> @@ -160,6 +160,7 @@ static int lidar_get_measurement(struct lidar_data *data, u16 *reg)
> ret = lidar_write_control(data, LIDAR_REG_CONTROL_ACQUIRE);
> if (ret < 0) {
> dev_err(&client->dev, "cannot send start measurement command");
> + pm_runtime_put_noidle(&client->dev);
> return ret;
> }
>
Powered by blists - more mailing lists