From patchwork Mon Oct 24 11:30:05 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Greg KH X-Patchwork-Id: 9599 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:6687:0:0:0:0:0 with SMTP id l7csp529577wru; Mon, 24 Oct 2022 09:03:49 -0700 (PDT) X-Google-Smtp-Source: AMsMyM4pZTjnsV+KEVf8CzBEEI9+78pqm+n5f/XNz5g3bbniCaA/M1rt5oyq9VRRJCLGCm0YWgTJ X-Received: by 2002:a17:903:40cd:b0:186:8869:739c with SMTP id t13-20020a17090340cd00b001868869739cmr14055059pld.97.1666627429502; Mon, 24 Oct 2022 09:03:49 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666627429; cv=none; d=google.com; s=arc-20160816; b=NLUG5bLv2BxXourTlbH/dJoHXJlqP+cAmVbXCx2/mbCmbTJgtJ4bWiKPx8HKebHjU3 nU4SPu7QePV5sqR8H0pblvcmYia3/eOPW7XAwh2bluEG7e8ckbbqowBx1Nv9XANZSA7m neVx8+CgOtXOQ0DPnDrpbg2nU9r57KWkk1sf3Eodq8WOZdrd9RI4Z4jwIUJN5wFtEBqC 1OM+F86tY4uwVj8iFzxJWimk9y/XM9AD6/cu6v+gz6aKmmwUnB7IHh0A5B8FkhO+jnPq abnZV5ERfkXykJbn28borqBmpcVJnn4PCKjkPnwnIKDSbaRZIE9AKy68ur6pt9Hrvpkt RPvA== 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=Mr7YI7b6a/gTG3EXAbCkf4WMxEEhxJRj15RqhxJfXB9zTMBadIdTBLAxVp4xCsD5X7 5hAgjV19m+9XtDD0fYNo+nI4euHrRB1ZHWepVKiFqzQkR1K/ut7Jxlo+Lpx5BK9pxF36 1ZSR60B2A+aQsd1kFk15i3NHdFz5FmafYAaDQWK8lhaDQiUOTkPJWaW3fXG9t2roYYzq lf6XDSYgbc7ZvY4I3jlpeL1L3bsCvOEDeHbRtDwmns+c7OcWv3oiwbfdu3aSbnRDJW+K F+GNuZozikuaxXD+T+FaRDA8hm7OZzJSgNKLyG7oY1lGc5gl4ECVvKPttqP4nPyBLOmt Jz9g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=Y+bqk5G5; 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 b6-20020a639306000000b00461f10556b9si34376551pge.319.2022.10.24.09.03.29; Mon, 24 Oct 2022 09:03:49 -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=Y+bqk5G5; 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 S232640AbiJXQCM (ORCPT + 99 others); Mon, 24 Oct 2022 12:02:12 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59838 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232292AbiJXQAS (ORCPT ); Mon, 24 Oct 2022 12:00:18 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [IPv6:2604:1380:4601:e00::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E5F5F89953; Mon, 24 Oct 2022 07:55:08 -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 84DD2B81676; Mon, 24 Oct 2022 12:25:01 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id DC469C433D6; Mon, 24 Oct 2022 12:24:59 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1666614300; bh=lU1rMge4AvOB32EqEc1cYUnGuxCTzQQf26R06XK4qiY=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Y+bqk5G5Ad70nrU8SlzPsI7bwJKaRTQjAemU3+k8Dhqpv9izFDa2XHY+l/0WtMWxO sZAqtQX3UvKbC3tUjvtr0HzU9ddanZfxj2sFch/wYRJ1M5tDgkIBZqxUTPxyx/cjb5 /H80JbvZXuhGZsEOwl6bNW3lADHkojc4M+r88Vt4= 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.10 208/390] media: meson: vdec: add missing clk_disable_unprepare on error in vdec_hevc_start() Date: Mon, 24 Oct 2022 13:30:05 +0200 Message-Id: <20221024113031.637131515@linuxfoundation.org> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20221024113022.510008560@linuxfoundation.org> References: <20221024113022.510008560@linuxfoundation.org> User-Agent: quilt/0.67 MIME-Version: 1.0 X-Spam-Status: No, score=-7.6 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?1747585523478171681?= X-GMAIL-MSGID: =?utf-8?q?1747585523478171681?= 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,