[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <6ddb18be-2b89-03ca-a839-4ec97fe9f8d4@baylibre.com>
Date: Fri, 19 Aug 2022 10:58:41 +0200
From: Neil Armstrong <narmstrong@...libre.com>
To: Xu Qiang <xuqiang36@...wei.com>, mchehab@...nel.org,
gregkh@...uxfoundation.org, khilman@...libre.com,
jbrunet@...libre.com, martin.blumenstingl@...glemail.com,
mjourdan@...libre.com, hverkuil-cisco@...all.nl
Cc: linux-media@...r.kernel.org, linux-amlogic@...ts.infradead.org,
linux-staging@...ts.linux.dev,
linux-arm-kernel@...ts.infradead.org, linux-kernel@...r.kernel.org,
guohanjun@...wei.com, weiyongjun1@...wei.com
Subject: Re: [PATCH -next] media: meson: vdec: add missing
clk_disable_unprepare on error in vdec_hevc_start()
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@...wei.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@...libre.com>
Powered by blists - more mailing lists