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: 13076039 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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 6D8CFC4332F for ; Sun, 18 Dec 2022 13:02:26 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Message-Id:Date:Subject:Cc :To:From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=5kVpFwxZu6x3tBUsimcge8TZ3kgwhqUyFB1jjJtoPAM=; b=tH490+8mCp3CJV tLlVbNtat1NPtargZpDXnKIq/g3tPXNWA9szAoOPWgNF/BN8QeWkUxL5Lf3cF3O9TlFdbDLx2dwFc F9XG691OhjiMs3IB2d1cp7+sNFNBtGpydTC8SyJoJP4XJnbSS9vSVBgHDy0ad0x/FSOjVzE9wW3qq sq7bcsFTZDzpswWY6ClBAk92IUpTMXUVAe9ik97Dau8oEZlrmhmR9fz5hJmj6pF/3A3DKosY5hS7M S/OwB5uhIhRL+/lqbIg0Nu1LI+58JooAvLTr/c/jASHsGBr0TFlpYX4rMBYv6CnzmGQdHju7PusxA JgAC8tscQ//xqWda4fgg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1p6tHm-001ZzR-Nz; Sun, 18 Dec 2022 13:00:58 +0000 Received: from viti.kaiser.cx ([2a01:238:43fe:e600:cd0c:bd4a:7a3:8e9f]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1p6tHh-001Zoz-TU; Sun, 18 Dec 2022 13:00:55 +0000 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-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20221218_050054_126760_0E340990 X-CRM114-Status: UNSURE ( 8.02 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org 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;