linux-media.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Fabien DESSENNE <fabien.dessenne@st.com>
To: Dinghao Liu <dinghao.liu@zju.edu.cn>, "kjlu@umn.edu" <kjlu@umn.edu>
Cc: Mauro Carvalho Chehab <mchehab@kernel.org>,
	"linux-media@vger.kernel.org" <linux-media@vger.kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] media: bdisp: Fix runtime PM imbalance on error
Date: Mon, 25 May 2020 12:41:18 +0000	[thread overview]
Message-ID: <85657433-659c-ca96-b77b-697eb8b9d702@st.com> (raw)
In-Reply-To: <20200521100021.12461-1-dinghao.liu@zju.edu.cn>

Hi,

Looks good to me.

Reviewed-by: Fabien Dessenne <fabien.dessenne@st.com>

BR

Fabien


On 21/05/2020 12:00 pm, Dinghao Liu wrote:
> pm_runtime_get_sync() increments the runtime PM usage counter even
> when it returns an error code. Thus a pairing decrement is needed on
> the error handling path to keep the counter balanced.
>
> Signed-off-by: Dinghao Liu <dinghao.liu@zju.edu.cn>
> ---
>   drivers/media/platform/sti/bdisp/bdisp-v4l2.c | 3 +--
>   1 file changed, 1 insertion(+), 2 deletions(-)
>
> diff --git a/drivers/media/platform/sti/bdisp/bdisp-v4l2.c b/drivers/media/platform/sti/bdisp/bdisp-v4l2.c
> index af2d5eb782ce..e1d150584bdc 100644
> --- a/drivers/media/platform/sti/bdisp/bdisp-v4l2.c
> +++ b/drivers/media/platform/sti/bdisp/bdisp-v4l2.c
> @@ -1371,7 +1371,7 @@ static int bdisp_probe(struct platform_device *pdev)
>   	ret = pm_runtime_get_sync(dev);
>   	if (ret < 0) {
>   		dev_err(dev, "failed to set PM\n");
> -		goto err_dbg;
> +		goto err_pm;
>   	}
>   
>   	/* Filters */
> @@ -1399,7 +1399,6 @@ static int bdisp_probe(struct platform_device *pdev)
>   	bdisp_hw_free_filters(bdisp->dev);
>   err_pm:
>   	pm_runtime_put(dev);
> -err_dbg:
>   	bdisp_debugfs_remove(bdisp);
>   err_v4l2:
>   	v4l2_device_unregister(&bdisp->v4l2_dev);

  reply	other threads:[~2020-05-25 12:41 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-05-21 10:00 [PATCH] media: bdisp: Fix runtime PM imbalance on error Dinghao Liu
2020-05-25 12:41 ` Fabien DESSENNE [this message]
2020-06-08 13:33 ` Hans Verkuil

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=85657433-659c-ca96-b77b-697eb8b9d702@st.com \
    --to=fabien.dessenne@st.com \
    --cc=dinghao.liu@zju.edu.cn \
    --cc=kjlu@umn.edu \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-media@vger.kernel.org \
    --cc=mchehab@kernel.org \
    /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).