From patchwork Wed May 24 12:11:44 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hans Verkuil X-Patchwork-Id: 13253850 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 4BF3EC7EE2C for ; Wed, 24 May 2023 12:12:00 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231328AbjEXML7 (ORCPT ); Wed, 24 May 2023 08:11:59 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42370 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230306AbjEXML5 (ORCPT ); Wed, 24 May 2023 08:11:57 -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 3A54F95 for ; Wed, 24 May 2023 05:11:56 -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 C3E8D63C95 for ; Wed, 24 May 2023 12:11:55 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 29F3AC433EF; Wed, 24 May 2023 12:11:54 +0000 (UTC) From: Hans Verkuil To: linux-media@vger.kernel.org Cc: Hans Verkuil , Jacob Chen , Ezequiel Garcia , Michael Tretter Subject: [PATCH 2/8] media: rockchip: rga: fix clock cleanup Date: Wed, 24 May 2023 14:11:44 +0200 Message-Id: <20230524121150.435736-3-hverkuil-cisco@xs4all.nl> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230524121150.435736-1-hverkuil-cisco@xs4all.nl> References: <20230524121150.435736-1-hverkuil-cisco@xs4all.nl> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org Fix this smatch warning: drivers/media/platform/rockchip/rga/rga.c:734 rga_enable_clocks() warn: 'rga->sclk' from clk_prepare_enable() not released on lines: 734. The reason is that aclk should be disabled/unprepared before sclk, instead of the other way around. Signed-off-by: Hans Verkuil Cc: Jacob Chen Cc: Ezequiel Garcia Cc: Michael Tretter Reviewed-by: Michael Tretter --- drivers/media/platform/rockchip/rga/rga.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/media/platform/rockchip/rga/rga.c b/drivers/media/platform/rockchip/rga/rga.c index 67dcf22e5ba3..cbb33dd62fdd 100644 --- a/drivers/media/platform/rockchip/rga/rga.c +++ b/drivers/media/platform/rockchip/rga/rga.c @@ -726,10 +726,10 @@ static int rga_enable_clocks(struct rockchip_rga *rga) return 0; -err_disable_sclk: - clk_disable_unprepare(rga->sclk); err_disable_aclk: clk_disable_unprepare(rga->aclk); +err_disable_sclk: + clk_disable_unprepare(rga->sclk); return ret; }