mirror of https://lore.kernel.org/linux-amlogic/
 help / color / mirror / Atom feed
From: Neil Armstrong <narmstrong@baylibre.com>
To: Xu Qiang <xuqiang36@huawei.com>,
	mchehab@kernel.org, gregkh@linuxfoundation.org,
	khilman@baylibre.com, jbrunet@baylibre.com,
	martin.blumenstingl@googlemail.com, mjourdan@baylibre.com,
	hverkuil-cisco@xs4all.nl
Cc: linux-media@vger.kernel.org, linux-amlogic@lists.infradead.org,
	linux-staging@lists.linux.dev,
	linux-arm-kernel@lists.infradead.org,
	linux-kernel@vger.kernel.org, guohanjun@huawei.com,
	weiyongjun1@huawei.com
Subject: Re: [PATCH -next] media: meson: vdec: add missing clk_disable_unprepare on error in vdec_hevc_start()
Date: Fri, 19 Aug 2022 10:58:41 +0200	[thread overview]
Message-ID: <6ddb18be-2b89-03ca-a839-4ec97fe9f8d4@baylibre.com> (raw)
In-Reply-To: <20220818065753.104050-1-xuqiang36@huawei.com>

On 18/08/2022 08:57, Xu Qiang wrote:
> Add the missing clk_disable_unprepare() before return
> from vdec_hevc_start() in the error handling case.
> 
> Fixes: 823a7300340e (“media: meson: vdec: add common HEVC decoder support”)
> Signed-off-by: Xu Qiang <xuqiang36@huawei.com>
> ---
>   drivers/staging/media/meson/vdec/vdec_hevc.c | 6 +++++-
>   1 file changed, 5 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/staging/media/meson/vdec/vdec_hevc.c b/drivers/staging/media/meson/vdec/vdec_hevc.c
> index 9530e580e57a..afced435c907 100644
> --- a/drivers/staging/media/meson/vdec/vdec_hevc.c
> +++ b/drivers/staging/media/meson/vdec/vdec_hevc.c
> @@ -167,8 +167,12 @@ static int vdec_hevc_start(struct amvdec_session *sess)
>   
>   	clk_set_rate(core->vdec_hevc_clk, 666666666);
>   	ret = clk_prepare_enable(core->vdec_hevc_clk);
> -	if (ret)
> +	if (ret) {
> +		if (core->platform->revision == VDEC_REVISION_G12A ||
> +		    core->platform->revision == VDEC_REVISION_SM1)
> +			clk_disable_unprepare(core->vdec_hevcf_clk);
>   		return ret;
> +	}
>   
>   	if (core->platform->revision == VDEC_REVISION_SM1)
>   		regmap_update_bits(core->regmap_ao, AO_RTI_GEN_PWR_SLEEP0,

Reviewed-by: Neil Armstrong <narmstrong@baylibre.com>

_______________________________________________
linux-amlogic mailing list
linux-amlogic@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-amlogic

      reply	other threads:[~2022-08-19  8:59 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-08-18  6:57 Xu Qiang
2022-08-19  8:58 ` Neil Armstrong [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=6ddb18be-2b89-03ca-a839-4ec97fe9f8d4@baylibre.com \
    --to=narmstrong@baylibre.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=guohanjun@huawei.com \
    --cc=hverkuil-cisco@xs4all.nl \
    --cc=jbrunet@baylibre.com \
    --cc=khilman@baylibre.com \
    --cc=linux-amlogic@lists.infradead.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-media@vger.kernel.org \
    --cc=linux-staging@lists.linux.dev \
    --cc=martin.blumenstingl@googlemail.com \
    --cc=mchehab@kernel.org \
    --cc=mjourdan@baylibre.com \
    --cc=weiyongjun1@huawei.com \
    --cc=xuqiang36@huawei.com \
    /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

all inboxes | Powered by JetHome®