From nobody Fri Dec 19 18:53:16 2025 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 5CBC7C38A2D for ; Mon, 24 Oct 2022 14:02:27 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236863AbiJXOCD (ORCPT ); Mon, 24 Oct 2022 10:02:03 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51416 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236891AbiJXOAR (ORCPT ); Mon, 24 Oct 2022 10:00:17 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C90308E73A; Mon, 24 Oct 2022 05:47:17 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 94FED612A4; Mon, 24 Oct 2022 12:45:31 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id A6FD6C433D6; Mon, 24 Oct 2022 12:45:30 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1666615531; bh=lU1rMge4AvOB32EqEc1cYUnGuxCTzQQf26R06XK4qiY=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=DdJ2SXyiXRMcHbC3S+ee3oVgfPWInrXJpQWd+SFys6Ovji/bkwtGcC4v0GXQTv9Q6 G0ppDy3dHaL1jgYq+cyNEg4loxaTyWoA+Rq+3vV/tvd7H2qKGnOnHtHzDF4DWDa7NH fkemlRGF7QELQ0PWIQ3XRDBDA/rA1+ZNRNK8sYVQ= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Xu Qiang , Neil Armstrong , Hans Verkuil , Mauro Carvalho Chehab , Sasha Levin Subject: [PATCH 5.15 286/530] media: meson: vdec: add missing clk_disable_unprepare on error in vdec_hevc_start() Date: Mon, 24 Oct 2022 13:30:30 +0200 Message-Id: <20221024113057.997955984@linuxfoundation.org> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20221024113044.976326639@linuxfoundation.org> References: <20221024113044.976326639@linuxfoundation.org> User-Agent: quilt/0.67 MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Xu Qiang [ Upstream commit 4029372233e13e281f8c387f279f9f064ced3810 ] Add the missing clk_disable_unprepare() before return from vdec_hevc_start() in the error handling case. Fixes: 823a7300340e (=E2=80=9Cmedia: meson: vdec: add common HEVC decoder s= upport=E2=80=9D) Signed-off-by: Xu Qiang Reviewed-by: Neil Armstrong Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab Signed-off-by: Sasha Levin --- 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) =20 clk_set_rate(core->vdec_hevc_clk, 666666666); ret =3D clk_prepare_enable(core->vdec_hevc_clk); - if (ret) + if (ret) { + if (core->platform->revision =3D=3D VDEC_REVISION_G12A || + core->platform->revision =3D=3D VDEC_REVISION_SM1) + clk_disable_unprepare(core->vdec_hevcf_clk); return ret; + } =20 if (core->platform->revision =3D=3D VDEC_REVISION_SM1) regmap_update_bits(core->regmap_ao, AO_RTI_GEN_PWR_SLEEP0, --=20 2.35.1