From patchwork Sun Dec 18 13:00:21 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Martin Kaiser X-Patchwork-Id: 34316 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:e747:0:0:0:0:0 with SMTP id c7csp1909871wrn; Sun, 18 Dec 2022 05:04:57 -0800 (PST) X-Google-Smtp-Source: AMrXdXueL+Ss08hyf5yRVFkO+xmmx/1maYETS0Y3bLTVX/ALKV+BBRwS0JAH2ANfmkLqxDo0y90J X-Received: by 2002:aa7:d1c7:0:b0:472:3ccb:3eab with SMTP id g7-20020aa7d1c7000000b004723ccb3eabmr15313708edp.14.1671368696938; Sun, 18 Dec 2022 05:04:56 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1671368696; cv=none; d=google.com; s=arc-20160816; b=SVK8qymVJk/M9bGTFTKmxX+NqKxKgLYdGseGjDsqBUU7NFecn1MfClaXf1cMsbnr3R Sz4kttf6gkP70bWbx9v4A+NGyINzhNu5z1VdIJvtg460y3mw7FdKE1rjfwuWCAY1WtbB M2KmcN3f/cEuoMQugkcvW6q104XhUzGN7C5j6rMTJ4UhLOZIBXC7nXr+wiD0VikFLvQf mO+LfJy2cog2qjB00S5wmaQPEl7LyuzBgkIZjlbITUNmAw/bvSDKxwwQKHA5iAIXHdf8 R2vlxukZEUb3ToBOqXjeMCgJE5NxsvSvZYUKaECc758DXbvps3OIIcwxiVLitOhfzrmo 1F2A== 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 :message-id:date:subject:cc:to:from; bh=tMoVCpaCjLROJI8IdUG00yqBfSUQPsRoqoutq8kB+uE=; b=AHBl4Id2k9hSGjyw4MamL3dWwJZHveBZz1Im1AdP8WyzeyFTeNdBGxB0jY9yRGUQ8+ R3VMubNAC2SB0GxuGN43Pn7bUXrgRkiyzJw+Es31n7rETuU4iv0bCVJgGIyopCCiEkgu TVqrHw9qbaEx1neLlxSD/SvIUJRmqloSJ+M4CzPFGFHlU/rSfpSTX+wieQGeiXJxxuC9 rzWXb2itrXHt9cABeyp0brYuJUvotW1zVzUr2T1cVvOl6iFiPknRevUP5PEOx4fcIpQB aBrTKd4bWI0mki09kCl0wSBY+kL+WwqaJgCpgHQpBZp12z+iYPcWK8pitf2KI/V2u72g BbYw== ARC-Authentication-Results: i=1; mx.google.com; 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 Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id e12-20020a056402190c00b0046c9522362asi7829411edz.269.2022.12.18.05.04.21; Sun, 18 Dec 2022 05:04:56 -0800 (PST) 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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230157AbiLRNA7 (ORCPT + 99 others); Sun, 18 Dec 2022 08:00:59 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35158 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229730AbiLRNA5 (ORCPT ); Sun, 18 Dec 2022 08:00:57 -0500 Received: from viti.kaiser.cx (viti.kaiser.cx [IPv6:2a01:238:43fe:e600:cd0c:bd4a:7a3:8e9f]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A65D010F6 for ; Sun, 18 Dec 2022 05:00:55 -0800 (PST) Received: from dslb-178-004-201-210.178.004.pools.vodafone-ip.de ([178.4.201.210] helo=martin-debian-2.paytec.ch) by viti.kaiser.cx with esmtpsa (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.89) (envelope-from ) id 1p6tHV-0006ch-5i; Sun, 18 Dec 2022 14:00:41 +0100 From: Martin Kaiser To: =?utf-8?q?Andreas_F=C3=A4rber?= , Manivannan Sadhasivam , Russell King Cc: Martin Kaiser , linux-arm-kernel@lists.infradead.org, linux-actions@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH] ARM: actions: add missing of_node_put calls Date: Sun, 18 Dec 2022 14:00:21 +0100 Message-Id: <20221218130022.393749-1-martin@kaiser.cx> X-Mailer: git-send-email 2.30.2 MIME-Version: 1.0 X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,SPF_HELO_NONE, SPF_NONE 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?1752557102660393174?= X-GMAIL-MSGID: =?utf-8?q?1752557102660393174?= A node that is returned by of_find_compatible_node has its refcount incremented. We have to call of_node_put when the node is no longer needed. Add the missing of_node_put calls in function s500_smp_prepare_cpus. Signed-off-by: Martin Kaiser --- compile-tested only, I don't have this hardware arch/arm/mach-actions/platsmp.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/arch/arm/mach-actions/platsmp.c b/arch/arm/mach-actions/platsmp.c index f26618b43514..9fe9a0bd0fd0 100644 --- a/arch/arm/mach-actions/platsmp.c +++ b/arch/arm/mach-actions/platsmp.c @@ -103,6 +103,7 @@ static void __init s500_smp_prepare_cpus(unsigned int max_cpus) } timer_base_addr = of_iomap(node, 0); + of_node_put(node); if (!timer_base_addr) { pr_err("%s: could not map timer registers\n", __func__); return; @@ -115,6 +116,7 @@ static void __init s500_smp_prepare_cpus(unsigned int max_cpus) } sps_base_addr = of_iomap(node, 0); + of_node_put(node); if (!sps_base_addr) { pr_err("%s: could not map sps registers\n", __func__); return; @@ -128,6 +130,7 @@ static void __init s500_smp_prepare_cpus(unsigned int max_cpus) } scu_base_addr = of_iomap(node, 0); + of_node_put(node); if (!scu_base_addr) { pr_err("%s: could not map scu registers\n", __func__); return;