Received: by 2002:a05:6358:1087:b0:cb:c9d3:cd90 with SMTP id j7csp877829rwi; Wed, 19 Oct 2022 04:13:06 -0700 (PDT) X-Google-Smtp-Source: AMsMyM6D/2S9CbE0UcDd5yfEQ5mZza/i1msieGcFoNpnxDg4tC6WK/fD2JYwXe4OaIaGe1CCsVgU X-Received: by 2002:a63:8a42:0:b0:45f:f0f0:148f with SMTP id y63-20020a638a42000000b0045ff0f0148fmr6919601pgd.93.1666177986047; Wed, 19 Oct 2022 04:13:06 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666177986; cv=none; d=google.com; s=arc-20160816; b=HvVHn5T7i9pTsZRijZKvT78PiLV/FfQpOaCT7BoWHaqenv+i5arUKl4m7ofRqzRn0Y VcIRD87OjDNyfSf2ndydKaZLd7n7K+0IxVBAozOSa+MYbqUjvnGGoXb8x+pnpzMrBbMZ Khc6FaIqZbd42fEWKFP33m6XI+cLavO8uUsgIZOf2eot5fj523Mti0mhoz+G6qXcJ3to +9314/+skMtNPo4lxvP0cRAbBIA21WfIhVyt2aQNWD3+qAioP11Jlo2IBc9DfFraw7OR 9Bt1J3sSZfe9ne5Sk2TZR9FURzRGBmnk2kBpgndIIIxgSWiNY1mXxHGmp/pXiF4EsBaE 4oQw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=XhWVOrWp1pGGSeEQALigQ8X9+kgy5G8IEinUpuJjHGU=; b=gFZ48cRG7MU5OF0xl1CBRIoYLaaiV/CxJR4NyUczulGRg72UVTjbQdzJ0SesWHp9eq yJhE/xqaL1GSurFdc6Fdxrwq3GWUEUSAHIH1ECWyYS9qX4a8OMUwXs0GL3PqHPZsyJ9+ lCXNSIQdxkrMRAsVBzf8ODJn+i9KFLgND6N+deW+lbwBUlhYFtWv8bvVJlun/kY+TvOA u/yp1Pcr2zRUSODmPHDs5dvnPCyK7utCIaN8v2Zqvg1QTURYRrbkpF31+aIzO5YqNodA a+wstMeWbcTQqu4ud6cPDsUR8dRLVSAFZfawqlgQhTq343/cjM/ZPJTrGP53DLJmOm6+ m8yw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=j4ynn39e; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id y23-20020a17090aa41700b0020ae29877besi15951094pjp.20.2022.10.19.04.12.51; Wed, 19 Oct 2022 04:13:06 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=j4ynn39e; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234482AbiJSKu4 (ORCPT + 99 others); Wed, 19 Oct 2022 06:50:56 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54656 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234275AbiJSKs3 (ORCPT ); Wed, 19 Oct 2022 06:48:29 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 776F611F494; Wed, 19 Oct 2022 03:22:02 -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 ams.source.kernel.org (Postfix) with ESMTPS id 21D7CB82459; Wed, 19 Oct 2022 09:00:13 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 7CFF3C43143; Wed, 19 Oct 2022 09:00:11 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1666170011; bh=lU1rMge4AvOB32EqEc1cYUnGuxCTzQQf26R06XK4qiY=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=j4ynn39eImlDyJG4z3aiBnDvSTz3RwfNQ1bf5ad3Q77VWURqQPBrFAP3YiuYPCCaS IEp5PllsHrkbg7yOrQxjXn11A6oSGLVV6w5G9rt1zfCmzOCMR/ZRt8ocq6YwSX1qnZ MFh5IATmH8BqoF9AwcJ50UhcoyWYc9TV3vLOkZfA= 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 6.0 494/862] media: meson: vdec: add missing clk_disable_unprepare on error in vdec_hevc_start() Date: Wed, 19 Oct 2022 10:29:41 +0200 Message-Id: <20221019083311.804252411@linuxfoundation.org> X-Mailer: git-send-email 2.38.0 In-Reply-To: <20221019083249.951566199@linuxfoundation.org> References: <20221019083249.951566199@linuxfoundation.org> User-Agent: quilt/0.67 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-7.4 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net 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 (“media: meson: vdec: add common HEVC decoder support”) 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) 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, -- 2.35.1