From: Hugues FRUCHET - FOSS <hugues.fruchet@foss.st.com>
To: Miaoqian Lin <linmq006@gmail.com>,
Mauro Carvalho Chehab <mchehab@kernel.org>,
Peter Griffin <peter.griffin@linaro.org>,
<linux-media@vger.kernel.org>, <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH v3] media: st-delta: Fix PM disable depth imbalance in delta_probe
Date: Thu, 10 Mar 2022 17:32:32 +0100 [thread overview]
Message-ID: <9d543059-2a3b-e5b2-59f2-30819d49b74b@foss.st.com> (raw)
In-Reply-To: <20220307080859.14475-1-linmq006@gmail.com>
Hi Miaoqian Lin,
Thanks for the patch !
Acked-by: Hugues Fruchet <hugues.fruchet@foss.st.com>
BR,
Hugues.
On 3/7/22 9:08 AM, Miaoqian Lin wrote:
> The pm_runtime_enable will decrease power disable depth.
> If the probe fails, we should use pm_runtime_disable() to balance
> pm_runtime_enable().
>
> Fixes: f386509 ("[media] st-delta: STiH4xx multi-format video decoder v4l2 driver")
> Signed-off-by: Miaoqian Lin <linmq006@gmail.com>
> ---
> changes in v2:
> - remove unused label.
> changes in v3:
> - add err_pm_disable label and update related 'goto err'.
> - update commit message
> ---
> drivers/media/platform/sti/delta/delta-v4l2.c | 6 ++++--
> 1 file changed, 4 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/media/platform/sti/delta/delta-v4l2.c b/drivers/media/platform/sti/delta/delta-v4l2.c
> index c887a31ebb54..420ad4d8df5d 100644
> --- a/drivers/media/platform/sti/delta/delta-v4l2.c
> +++ b/drivers/media/platform/sti/delta/delta-v4l2.c
> @@ -1859,7 +1859,7 @@ static int delta_probe(struct platform_device *pdev)
> if (ret) {
> dev_err(delta->dev, "%s failed to initialize firmware ipc channel\n",
> DELTA_PREFIX);
> - goto err;
> + goto err_pm_disable;
> }
>
> /* register all available decoders */
> @@ -1873,7 +1873,7 @@ static int delta_probe(struct platform_device *pdev)
> if (ret) {
> dev_err(delta->dev, "%s failed to register V4L2 device\n",
> DELTA_PREFIX);
> - goto err;
> + goto err_pm_disable;
> }
>
> delta->work_queue = create_workqueue(DELTA_NAME);
> @@ -1898,6 +1898,8 @@ static int delta_probe(struct platform_device *pdev)
> destroy_workqueue(delta->work_queue);
> err_v4l2:
> v4l2_device_unregister(&delta->v4l2_dev);
> +err_pm_disable:
> + pm_runtime_disable(dev);
> err:
> return ret;
> }
>
prev parent reply other threads:[~2022-03-10 16:32 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-01-05 11:55 [PATCH] media: st-delta: Fix PM disable depth imbalance in delta_probe Miaoqian Lin
2022-03-01 3:12 ` [PATCH v2] " Miaoqian Lin
2022-03-07 7:35 ` Hans Verkuil
2022-03-07 8:08 ` [PATCH v3] " Miaoqian Lin
2022-03-10 16:32 ` Hugues FRUCHET - FOSS [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=9d543059-2a3b-e5b2-59f2-30819d49b74b@foss.st.com \
--to=hugues.fruchet@foss.st.com \
--cc=linmq006@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-media@vger.kernel.org \
--cc=mchehab@kernel.org \
--cc=peter.griffin@linaro.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).