From patchwork Wed Oct 19 08:29:41 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Greg KH X-Patchwork-Id: 5132 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:4ac7:0:0:0:0:0 with SMTP id y7csp251708wrs; Wed, 19 Oct 2022 03:52:29 -0700 (PDT) X-Google-Smtp-Source: AMsMyM6obWKZRsSGPj7YUAvkqDh5LjxQu0RDPgxsjlkgO+HhQRKedwtMhFhB7jVnL0K0n799qhFq X-Received: by 2002:a17:907:2bda:b0:78d:9144:fb6d with SMTP id gv26-20020a1709072bda00b0078d9144fb6dmr6187775ejc.238.1666176749006; Wed, 19 Oct 2022 03:52:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666176749; cv=none; d=google.com; s=arc-20160816; b=TEc//XKnVFzUGbD6LZ9PdquxfYzUrns7M66vivP+aCeIR7vscYSiKd6St6U3TD+HCq yz1eqtt7g6cVkkhm6kM9534Hu4iY0dBzN4Q85y54s4pKe54xNqptNVVMLIa/DJ91Lzey h7aEk1R1X1jJIASXdO63ZsvyANuYnzfWDRTN+ArNn+iT8VPSIjvIWUfswSq/XsrjmrCQ j8ExGA/N9nIu2TN5jA3muVo8z0Q+eLhNtfzDc0LtOLdQGdnNzwgkNL7Ckj26yaPcN4ka t9P95JswWLqY33SZuqa4BumZ85kdGFKHy8h8Zp4tFYV++0FsItS9MGf69m8sLlfSAROA iqwQ== 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 Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id cs11-20020a0564020c4b00b0045bce3fe831si13437984edb.522.2022.10.19.03.52.04; Wed, 19 Oct 2022 03:52:28 -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 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 X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1747112950802392005?= X-GMAIL-MSGID: =?utf-8?q?1747112950802392005?= 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,