lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAHp75VeH08V8UUDmPx=XrA98cvMnQXyF3Qe+5+mrTBe4C=1MFQ@mail.gmail.com>
Date:   Wed, 7 Apr 2021 10:40:02 +0300
From:   Andy Shevchenko <andy.shevchenko@...il.com>
To:     Dinghao Liu <dinghao.liu@....edu.cn>
Cc:     Kangjie Lu <kjlu@....edu>, Jonathan Cameron <jic23@...nel.org>,
        Lars-Peter Clausen <lars@...afoo.de>,
        Peter Meerwald-Stadler <pmeerw@...erw.net>,
        Alexandru Ardelean <alexandru.ardelean@...log.com>,
        Matt Ranostay <matt.ranostay@...sulko.com>,
        linux-iio <linux-iio@...r.kernel.org>,
        Linux Kernel Mailing List <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] iio: proximity: pulsedlight: Fix rumtime PM imbalance on error

On Wed, Apr 7, 2021 at 7:59 AM 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.

FWIW,
Reviewed-by: Andy Shevchenko <andy.shevchenko@...il.com>

> Signed-off-by: Dinghao Liu <dinghao.liu@....edu.cn>
> ---
>  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;
>         }
>
> --
> 2.17.1
>


-- 
With Best Regards,
Andy Shevchenko

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ