Message ID | 20221218142647.394881-2-martin@kaiser.cx |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:e747:0:0:0:0:0 with SMTP id c7csp1942825wrn; Sun, 18 Dec 2022 06:29:48 -0800 (PST) X-Google-Smtp-Source: AA0mqf5HF310AjpwbH66WQ6qu88oPhULiX9OXwWq5fTMCcTR+qNKKX0E/TP7KCcIrP//H6z1Ot9c X-Received: by 2002:a05:6a20:4b11:b0:ad:db18:6d0d with SMTP id fp17-20020a056a204b1100b000addb186d0dmr21201846pzb.59.1671373788461; Sun, 18 Dec 2022 06:29:48 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1671373788; cv=none; d=google.com; s=arc-20160816; b=Twyo1TwhCNB9Hw9xqDuZK3OG03Up0lzUgImQyqjD5+2g0QApZOf5X/p7MQjHxYkBnz A6n99UT2omx0aOr8V0Iz7oFKA1DbG12/u4QgqN2d3XIuTJhdOwGwaf68vYj/Ia1sc/5a MCIJGjEQNcCtJtGhRnuzJ4Bcz/BrlXo5w0GEJQh335ZHsIXYMrNRd6zAQcI8AEKsrVCO DakPQXHV2gCosC3x6vdQOGTq5+Ei/9fHF4gHjoIssdTvgTdlJLV80o8REr93zQyO9bma LOu4aojUvQk4RVHQTSPDH5Mj7be8FX7unSWLJztDHoTeFYigU77AIQG/h4uwpLWaeFFX 3rUg== 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 :references:in-reply-to:message-id:date:subject:cc:to:from; bh=Gsx2ZHnCLm3X0hL8Q297OFfXb7iI8e+E4t3VsK3Hg30=; b=npKPa35470s7UP3RO2qQQI80qQlGga0srk3SPoVdf/mhEdNTRk8GS8chWMeP2EfLLU BRnLXRr/FT3XAIRh/GH4V4PqFe3filXai6cjgm8kieybhHQXM6O7c6zb2raGGtS12l6x 8Ar1auGwOhiOSTXVUgXz0trXAArqRqPU3167C56kUVUfSShnjP+0ckIm6WCM1u03VK3O KqD8y0c2Yu0Zk3S6z4WmZRX1a689FPLxwTbW9ILiFrTtPyO96JyrZZ1F8ziA3XFg+Zry MnqqwYWVV8Yr+F/Y/2oqDzJlLbEiLojss9Rs+hPRbGVnyonuwkknF4Yv/ps6xZDh210x mm8w== 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 y12-20020a170902b48c00b00189788d1dedsi7342834plr.96.2022.12.18.06.29.21; Sun, 18 Dec 2022 06:29:48 -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 S230441AbiLRO1X (ORCPT <rfc822;peekingduck44@gmail.com> + 99 others); Sun, 18 Dec 2022 09:27:23 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46520 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230131AbiLRO1R (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Sun, 18 Dec 2022 09:27:17 -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 ACDEA63CC for <linux-kernel@vger.kernel.org>; Sun, 18 Dec 2022 06:27:16 -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 <martin@kaiser.cx>) id 1p6udF-0007F2-R8; Sun, 18 Dec 2022 15:27:13 +0100 From: Martin Kaiser <martin@kaiser.cx> To: Andre Przywara <andre.przywara@arm.com>, Russell King <linux@armlinux.org.uk> Cc: Martin Kaiser <martin@kaiser.cx>, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH 1/2] ARM: highbank: add missing of_node_put call Date: Sun, 18 Dec 2022 15:26:46 +0100 Message-Id: <20221218142647.394881-2-martin@kaiser.cx> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20221218142647.394881-1-martin@kaiser.cx> References: <20221218142647.394881-1-martin@kaiser.cx> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1752562441422091075?= X-GMAIL-MSGID: =?utf-8?q?1752562441422091075?= |
Series |
ARM: highbank: add missing of_node_put calls
|
|
Commit Message
Martin Kaiser
Dec. 18, 2022, 2:26 p.m. UTC
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 a missing of_node_put call in function highbank_init.
Signed-off-by: Martin Kaiser <martin@kaiser.cx>
---
arch/arm/mach-highbank/highbank.c | 1 +
1 file changed, 1 insertion(+)
Comments
On Sun, 18 Dec 2022 15:26:46 +0100 Martin Kaiser <martin@kaiser.cx> wrote: Hi Martin, > 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 a missing of_node_put call in function highbank_init. Thanks for the patch. So Ruyi sent the exact same one earlier this year already: https://lore.kernel.org/linux-arm-kernel/20220408094817.2494756-1-lv.ruyi@zte.com.cn/ I asked Arnd and Olof to take it back then (see my reply), but this somehow got lost. I will try to push on both Ruyi's and your second patch again - but I guess only after the holidays. Cheers, Andre > Signed-off-by: Martin Kaiser <martin@kaiser.cx> > --- > arch/arm/mach-highbank/highbank.c | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/arch/arm/mach-highbank/highbank.c b/arch/arm/mach-highbank/highbank.c > index 5d4f977ac7d2..97ccb8c1b3cd 100644 > --- a/arch/arm/mach-highbank/highbank.c > +++ b/arch/arm/mach-highbank/highbank.c > @@ -141,6 +141,7 @@ static void __init highbank_init(void) > /* Map system registers */ > np = of_find_compatible_node(NULL, NULL, "calxeda,hb-sregs"); > sregs_base = of_iomap(np, 0); > + of_node_put(np); > WARN_ON(!sregs_base); > > pm_power_off = highbank_power_off;
diff --git a/arch/arm/mach-highbank/highbank.c b/arch/arm/mach-highbank/highbank.c index 5d4f977ac7d2..97ccb8c1b3cd 100644 --- a/arch/arm/mach-highbank/highbank.c +++ b/arch/arm/mach-highbank/highbank.c @@ -141,6 +141,7 @@ static void __init highbank_init(void) /* Map system registers */ np = of_find_compatible_node(NULL, NULL, "calxeda,hb-sregs"); sregs_base = of_iomap(np, 0); + of_node_put(np); WARN_ON(!sregs_base); pm_power_off = highbank_power_off;