Received: by 2002:a05:6a10:7420:0:0:0:0 with SMTP id hk32csp4440965pxb; Mon, 21 Feb 2022 21:42:45 -0800 (PST) X-Google-Smtp-Source: ABdhPJyEluKigyrnwk6K6Gset1hk57ADEwkouKc3m6kQpkWjlTPoFtZEt+SqnORtFyfewsBD5TXy X-Received: by 2002:a62:868e:0:b0:4cd:df75:b021 with SMTP id x136-20020a62868e000000b004cddf75b021mr23243997pfd.81.1645508565102; Mon, 21 Feb 2022 21:42:45 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1645508565; cv=none; d=google.com; s=arc-20160816; b=bx2s8k2aIC4Bmfar1qBH+eQ0EG1yAzNjcySJa0MbwxS7f0ZtKeZ+x6KwAHyovPdUaX 4eIEvUW9IWM9MgBVYBXPgNnSCH2OQKUCNSaJpi+r5jbdngGtrl0/2ytia8qyCcwiAT1A BOJzYyB78wQW+Q4GeXKjUUf72cgGJ7k3x8zb05J/sZqneVJArzH4qIYEjvEIGcS7mp+V Ar0x5iNp51UDiB8+jhphyXAaapuqDIhMZVj8evT8sRxAy6qbdUwCy9pskSIdnsrMZ8/A flw78oTod77BLeEpqtVNI0rhFGrVvsShvnzUMXI6yWJvv2YA5TfPpCFFygyHDcziQemu Ycug== 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=lE0UBBxGoZpPoMPtaPBsZ24kVnBgN7otwNWwWcf4osI=; b=qXVzHt//QwLglrCD33fu3xQSCNxC9qRMdRzLwax8NITnML8uz3jlZ3sBx2/6Mxyp2a 8daD8yXbT6Vf92EQFOtxOCQllOvTsqaY9S7yQ3k36SXEtUfg28eDCNn7HMLxfpwUYcqp 20Z9IVQ06gSUSpB7N9ovmX9sq20EfMU5UZP/GyBiZXA22Sh5PzfTaaGFs6D9f9vNdmpV Dy+HKUlgmOa49OWSjPZPNavi+HQ8FoKYUF5GYZFfyUBhpUjLsfE+aao1QwwcKDXCMiea CrUJToVCEAz9NMWuQxd7Ys9uDt5hz2avBsp+CN6zAcj1WTYTssTk8stPputOg2LIH3Z2 8n3A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=YQcZrTqW; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 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 lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [23.128.96.19]) by mx.google.com with ESMTPS id e2si19527287pgb.321.2022.02.21.21.42.44 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 21 Feb 2022 21:42:45 -0800 (PST) Received-SPF: softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) client-ip=23.128.96.19; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=YQcZrTqW; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id B3372C5583; Mon, 21 Feb 2022 21:08:34 -0800 (PST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1349262AbiBUJMQ (ORCPT + 99 others); Mon, 21 Feb 2022 04:12:16 -0500 Received: from mxb-00190b01.gslb.pphosted.com ([23.128.96.19]:36068 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1347797AbiBUJIk (ORCPT ); Mon, 21 Feb 2022 04:08:40 -0500 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id F3BC226576; Mon, 21 Feb 2022 01:00:27 -0800 (PST) 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 8FA5D61202; Mon, 21 Feb 2022 09:00:27 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 74B61C340E9; Mon, 21 Feb 2022 09:00:26 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1645434027; bh=0ajMXluSAqvhHBE5hWclvfBMFrRyAUrOhetBDh6ThaM=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=YQcZrTqWRmNqglp5RY08vyEUwKCk81SB76XfOcdQ/IiWHU7RInTcrSwT34GX8kk+o Gzi8L9VHL43//uOQmAZK7X6yM0EnemMd8CSg4s4ru9+RwHMj9qUg8Ud8zL5VSiF/Hv fog2Oj1COB/vDrL0Z++GZ8CJhZkwwNGXlqMJcidc= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Wan Jiabing , Tony Lindgren , Sasha Levin Subject: [PATCH 5.4 67/80] ARM: OMAP2+: hwmod: Add of_node_put() before break Date: Mon, 21 Feb 2022 09:49:47 +0100 Message-Id: <20220221084917.783210821@linuxfoundation.org> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220221084915.554151737@linuxfoundation.org> References: <20220221084915.554151737@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RDNS_NONE,SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=no 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: Wan Jiabing [ Upstream commit 80c469a0a03763f814715f3d12b6f3964c7423e8 ] Fix following coccicheck warning: ./arch/arm/mach-omap2/omap_hwmod.c:753:1-23: WARNING: Function for_each_matching_node should have of_node_put() before break Early exits from for_each_matching_node should decrement the node reference counter. Signed-off-by: Wan Jiabing Signed-off-by: Tony Lindgren Signed-off-by: Sasha Levin --- arch/arm/mach-omap2/omap_hwmod.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/arch/arm/mach-omap2/omap_hwmod.c b/arch/arm/mach-omap2/omap_hwmod.c index 6289b288d60a6..202b740adee0e 100644 --- a/arch/arm/mach-omap2/omap_hwmod.c +++ b/arch/arm/mach-omap2/omap_hwmod.c @@ -782,8 +782,10 @@ static int __init _init_clkctrl_providers(void) for_each_matching_node(np, ti_clkctrl_match_table) { ret = _setup_clkctrl_provider(np); - if (ret) + if (ret) { + of_node_put(np); break; + } } return ret; -- 2.34.1