From: Hans Verkuil <hverkuil@xs4all.nl>
To: Dinghao Liu <dinghao.liu@zju.edu.cn>, kjlu@umn.edu
Cc: Fabien Dessenne <fabien.dessenne@st.com>,
Mauro Carvalho Chehab <mchehab@kernel.org>,
linux-media@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] media: bdisp: Fix runtime PM imbalance on error
Date: Mon, 8 Jun 2020 15:33:24 +0200 [thread overview]
Message-ID: <f4378f72-8348-33f8-48a3-aa361bbac5db@xs4all.nl> (raw)
In-Reply-To: <20200521100021.12461-1-dinghao.liu@zju.edu.cn>
On 21/05/2020 12:00, 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);
pm_runtime_put_sync()?
> -err_dbg:
> bdisp_debugfs_remove(bdisp);
> err_v4l2:
> v4l2_device_unregister(&bdisp->v4l2_dev);
>
Regards,
Hans
prev parent reply other threads:[~2020-06-08 13:33 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
2020-06-08 13:33 ` Hans Verkuil [this message]
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=f4378f72-8348-33f8-48a3-aa361bbac5db@xs4all.nl \
--to=hverkuil@xs4all.nl \
--cc=dinghao.liu@zju.edu.cn \
--cc=fabien.dessenne@st.com \
--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).