Received: by 2002:a05:6358:1087:b0:cb:c9d3:cd90 with SMTP id j7csp3914650rwi; Sat, 22 Oct 2022 02:07:11 -0700 (PDT) X-Google-Smtp-Source: AMsMyM7peDer6xvSc9HUwq5g56rVFu/29u+97JFlpBXstxQuzk8ywKilY6PighkDZUa0wHJiIimi X-Received: by 2002:a17:903:244d:b0:183:afb6:e7ea with SMTP id l13-20020a170903244d00b00183afb6e7eamr23646919pls.31.1666429631305; Sat, 22 Oct 2022 02:07:11 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666429631; cv=none; d=google.com; s=arc-20160816; b=oX31pmejaqAcZxWAW+zZ5eUJSAGA15aVBmMtZyk0NFKp1zHcNnBu84bUqQVHEeqdtb rPZ35wMoDmQ2XIxgecWsyhQKxBndhT933/Lg04pUq0qkY75aIKRTw9Gxl5Isxj5CB5Ay P77zLz800hntjnEb/wCdXh7o5+9V2+SKl61K/KJfhD300Hp87IIsbvkp8QebT5R2Bfho gF/+jHBSHe1Ghgprlwf8fupH4A9an6EwOmOYJB4NXOc6u9oPNY7Bkqv/pJBOHNO+IV+/ NcOMgg52kGAJYenomOKKCQQhFOTSxIUDCyj0r7sGSifYPWjCpps2KWyFno8JSuXcBqbH 4jSg== 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=PDMxbiQ53NpA1eTy+l2UNeKimrlo/bmnG87KyAWD1ENv8LPVFqF6rao3QPqwtVDmYK Gxx/2wCW3UOUfVyEptme5z3DBHmAYVpy8RfUvpF5N+Lmwfb84V4xtqesugzJ8BNX0Poe POKmgUB/JS5HGPYpJIE+hD2UstTnqxMetmmv2jrh9vG4XcU0nGh2LMAKWYBpiZjQ1OHu 14iLbUzowUx918n9Fw3aplDkjAS4H+jlC4NhpA0FYEEdyzyNt835mDzpDTKkC6kVitIY EKRcC4tMcb3xk1C0pPDY5IOQ9CdS9VTLGq/FxYvruZ6yC+y8bWs3L7NwDtNx1ZJ+tVk8 s14w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=lXYArmOD; 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 a2-20020a056a000c8200b005657b95c7d9si29390156pfv.348.2022.10.22.02.06.59; Sat, 22 Oct 2022 02:07:11 -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=lXYArmOD; 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 S233294AbiJVIJb (ORCPT + 99 others); Sat, 22 Oct 2022 04:09:31 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44302 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232394AbiJVIFN (ORCPT ); Sat, 22 Oct 2022 04:05:13 -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 DFB082D52FA; Sat, 22 Oct 2022 00:52:42 -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 68A98B82DF1; Sat, 22 Oct 2022 07:52:10 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id B1CAAC433D6; Sat, 22 Oct 2022 07:52:08 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1666425129; bh=lU1rMge4AvOB32EqEc1cYUnGuxCTzQQf26R06XK4qiY=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=lXYArmODH0feiJPoNYwwe31eQNeaO0aGoNx4fvnZjDi/PE1U+6DYflOzKDddoHsR/ GKXEUfvKL4a+9tNZDgh38qkuM+EbOb2q0KxuPo3ZpXRU8kG7e6wnb1PQjYYFYwNZFU z6TDV19zJdMnKDB71ZEw/71oemPSx3NOX86kIGLs= 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.19 400/717] media: meson: vdec: add missing clk_disable_unprepare on error in vdec_hevc_start() Date: Sat, 22 Oct 2022 09:24:39 +0200 Message-Id: <20221022072515.568243594@linuxfoundation.org> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20221022072415.034382448@linuxfoundation.org> References: <20221022072415.034382448@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.3 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