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 598FAC433EF for ; Wed, 15 Jun 2022 08:10:06 +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=FcQDZsaks4N2hp8KVgGuVinRnWxv9UgnmFp/BW/wHgw=; b=S3XNHJD/o4qP+G or5COoWmaiyDgyr06yxziECHYq3Y1l59M0JSzjvrfQhu/vd0AVa2Weqdq8Ntrm3r2ByuUjrCsPQBb VI+P8zNL2/SyNEcXnsaQGq2v7cQqLvKGc/ee0D5AmMnmTk68KIsk7xIfBderv8msJ6Bs/Ilmbwhyd 3AJ9Gke73MB/X0VSS2KyTWfkxysGCdZOjXiAQayrTY/AsjVHyzqREQQuE0IGDy87BR/QnI2LeaLFO dpWoNvbyDaqAL2tJ1jzJtgCL9qlgD0HuPTknUjxm0MitwY4eZ23yaaG41X/cV1Bp5spQvW5SYjjUM B1Iuf8CeVZt1GNCY1vMg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1o1O5I-00DBDA-Fx; Wed, 15 Jun 2022 08:09:04 +0000 Received: from mail-m965.mail.126.com ([123.126.96.5]) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1o1O5F-00DBCK-IV for linux-arm-kernel@lists.infradead.org; Wed, 15 Jun 2022 08:09:03 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=126.com; s=s110527; h=From:Subject:Date:Message-Id:MIME-Version; bh=8Ns5g EvAuYDLgBXJtS39BSCUULDUrj3lCfWZde535H0=; b=hiLSDZZ4hjxsiAobnepTn C85dzbrrR9y7nxXfbvMui9qnhjleTGNyk6M3LO7DxGWDZP/K+JltmgUrC9N57LR4 HX718EYg1wv9xxfwhSZjMY0KJIDI18mxOn2TOq/Yp62UP4KXBPAzTChiEnU4rf/Z j2m40D32QKtqKJInLg2Uik= Received: from localhost.localdomain (unknown [124.16.139.61]) by smtp10 (Coremail) with SMTP id NuRpCgDX1UmQk6liKTWxEg--.34720S2; Wed, 15 Jun 2022 16:08:49 +0800 (CST) From: heliang To: linux@armlinux.org.uk Cc: linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, windhl@126.com Subject: [PATCH] arm: mm: Add missing of_node_put() Date: Wed, 15 Jun 2022 16:08:46 +0800 Message-Id: <20220615080846.3960101-1-windhl@126.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 X-CM-TRANSID: NuRpCgDX1UmQk6liKTWxEg--.34720S2 X-Coremail-Antispam: 1Uf129KBjvdXoWruw4DJFyrZr45tFyxZFW7XFb_yoW3AwcEvF 1Iq3W3JrWrGF1xXF4kuF43CF1DCws8Cr1fXr1fZr17Gr1UZrWUXrZ8trn7tr1qgrWj9rW3 JrZ5Xr42vw4agjkaLaAFLSUrUUUUUb8apTn2vfkv8UJUUUU8Yxn0WfASr-VFAUDa7-sFnT 9fnUUvcSsGvfC2KfnxnUUI43ZEXa7sRuHq73UUUUU== X-Originating-IP: [124.16.139.61] X-CM-SenderInfo: hzlqvxbo6rjloofrz/xtbBGgEhF1-HZTUE4wAAsC X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220615_010901_991312_EC3F0237 X-CRM114-Status: UNSURE ( 8.41 ) 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: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org In feroceon_of_init, we use of_find_matching_node() to get a node pointer with refcount incremented. We should use of_node_put() when it is not used anymore. Signed-off-by: heliang --- arch/arm/mm/cache-feroceon-l2.c | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/arm/mm/cache-feroceon-l2.c b/arch/arm/mm/cache-feroceon-l2.c index 5c1b7a7b9af6..a10c4be14087 100644 --- a/arch/arm/mm/cache-feroceon-l2.c +++ b/arch/arm/mm/cache-feroceon-l2.c @@ -376,6 +376,7 @@ int __init feroceon_of_init(void) node = of_find_matching_node(NULL, feroceon_ids); if (node && of_device_is_compatible(node, "marvell,kirkwood-cache")) { base = of_iomap(node, 0); + of_node_put(node); if (!base) return -ENOMEM; -- 2.25.1 _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel