linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Andy Shevchenko <andy.shevchenko@gmail.com>
To: Dinghao Liu <dinghao.liu@zju.edu.cn>
Cc: Kangjie Lu <kjlu@umn.edu>, Jonathan Cameron <jic23@kernel.org>,
	Lars-Peter Clausen <lars@metafoo.de>,
	Peter Meerwald-Stadler <pmeerw@pmeerw.net>,
	Alexandru Ardelean <alexandru.ardelean@analog.com>,
	Matt Ranostay <matt.ranostay@konsulko.com>,
	linux-iio <linux-iio@vger.kernel.org>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] [v2] iio: proximity: pulsedlight: Fix rumtime PM imbalance on error
Date: Mon, 12 Apr 2021 12:23:43 +0300	[thread overview]
Message-ID: <CAHp75Vch8zrFmRQNkXE1HopPN_JBsNYfuRDpPN-W0m74OE7fhQ@mail.gmail.com> (raw)
In-Reply-To: <20210412053204.4889-1-dinghao.liu@zju.edu.cn>

On Mon, Apr 12, 2021 at 8:32 AM Dinghao Liu <dinghao.liu@zju.edu.cn> wrote:
>
> When lidar_write_control() fails, a pairing PM usage counter
> decrement is needed to keep the counter balanced.

You forgot to collect given tags.

> Fixes: 4ac4e086fd8c5 ("iio: pulsedlight-lidar-lite: add runtime PM")
> Signed-off-by: Dinghao Liu <dinghao.liu@zju.edu.cn>
> ---
>
> Changelog:
>
> v2: - Add the fix tag.
> ---
>  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

  reply	other threads:[~2021-04-12  9:45 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-04-12  5:32 [PATCH] [v2] iio: proximity: pulsedlight: Fix rumtime PM imbalance on error Dinghao Liu
2021-04-12  9:23 ` Andy Shevchenko [this message]
2021-04-18  9:45   ` Jonathan Cameron

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CAHp75Vch8zrFmRQNkXE1HopPN_JBsNYfuRDpPN-W0m74OE7fhQ@mail.gmail.com \
    --to=andy.shevchenko@gmail.com \
    --cc=alexandru.ardelean@analog.com \
    --cc=dinghao.liu@zju.edu.cn \
    --cc=jic23@kernel.org \
    --cc=kjlu@umn.edu \
    --cc=lars@metafoo.de \
    --cc=linux-iio@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=matt.ranostay@konsulko.com \
    --cc=pmeerw@pmeerw.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).