Received: by 2002:a25:1506:0:0:0:0:0 with SMTP id 6csp178195ybv; Wed, 12 Feb 2020 21:55:08 -0800 (PST) X-Google-Smtp-Source: APXvYqwJra0vKAWOdsxa2ZsePnX54PwdIK1CNANa30RMsJ9X8677OckB5P45/51QJalwYrBNV34Y X-Received: by 2002:a05:6830:1e30:: with SMTP id t16mr12309282otr.220.1581573307989; Wed, 12 Feb 2020 21:55:07 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1581573307; cv=none; d=google.com; s=arc-20160816; b=1EmE2n98XoATulsxiyWcrzecIMGPscf5lLG8tAzlR7vvG5C3MBFnWKuzEjfoa72EpY ChHihi/nKWGRg3V+otPuPGwAAXT8InZch4eu8PvbNTnD6Bh1dXjlVuORccn4D4uF+pi5 KeQf+wVH0Gubpid92tXsqvr66GGf2O4FwrbKDFL2wUUbNSHz5LhY6CW+YXr/x8LEx1LA qhaOwQziaLziuXwnbKuVxHB6u74zfy53+lER8rg88EMAAohyhBTOEJyvGC+cS5OWqlNU QUF+H9l08gvW1rvTMnCJH5kkcAQhY0TfHLZyV+RyKOPcbqJPH1dM2by+YtO7iPGXpRcC HWSA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from; bh=5RGHMj8ekNYmDJEcwd+bUuVB4XgqmGzgy3z62RPuGdU=; b=u3mdvqQFp/dHLakVf/JlP6ujGJhdRA8QEvGIOPvIrphQ6ipneFxIHnJXjTY1jd/7nG sIOPSHzi6JTJvP9oWsirNH5tIedzCEzBbdox3e/SiYLlXRNmtN7YgupR7raOHC6RN9lH Q+D/tfXwCTOBcGnkzof8n6xDyjtTyhaxyezudB6JqnTt3iJOcAeGkEvj9uIyNJaXjaQR l3T7BDU+RW6V9xbvTOM+b0u8gSUMXoW5/cgtyfTt5+RTdhoDvVjQxNwE2DWOsLasEzqI 7ccEyJDLeJLWba9F+ReVtaCdaBG74rHxhvb1T3f5afH1Or4n5AK0/LReRA+iqYw3qEXg PDNQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=nxp.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id a5si646487oti.22.2020.02.12.21.54.54; Wed, 12 Feb 2020 21:55:07 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=nxp.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729718AbgBMFxN (ORCPT + 99 others); Thu, 13 Feb 2020 00:53:13 -0500 Received: from inva020.nxp.com ([92.121.34.13]:54182 "EHLO inva020.nxp.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726436AbgBMFxM (ORCPT ); Thu, 13 Feb 2020 00:53:12 -0500 Received: from inva020.nxp.com (localhost [127.0.0.1]) by inva020.eu-rdc02.nxp.com (Postfix) with ESMTP id D5AF21A00A6; Thu, 13 Feb 2020 06:53:09 +0100 (CET) Received: from invc005.ap-rdc01.nxp.com (invc005.ap-rdc01.nxp.com [165.114.16.14]) by inva020.eu-rdc02.nxp.com (Postfix) with ESMTP id 747671A5559; Thu, 13 Feb 2020 06:53:00 +0100 (CET) Received: from localhost.localdomain (shlinux2.ap.freescale.net [10.192.224.44]) by invc005.ap-rdc01.nxp.com (Postfix) with ESMTP id 386994029B; Thu, 13 Feb 2020 13:52:49 +0800 (SGT) From: Anson Huang To: linux@armlinux.org.uk, shawnguo@kernel.org, s.hauer@pengutronix.de, kernel@pengutronix.de, festevam@gmail.com, allison@lohutok.net, tglx@linutronix.de, andrew.smirnov@gmail.com, kstewart@linuxfoundation.org, gregkh@linuxfoundation.org, rfontana@redhat.com, sakari.ailus@linux.intel.com, bhelgaas@google.com, dsterba@suse.com, peng.fan@nxp.com, okuno.kohji@jp.panasonic.com, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Cc: Linux-imx@nxp.com Subject: [PATCH] ARM: imx: Add missing of_node_put() Date: Thu, 13 Feb 2020 13:47:26 +0800 Message-Id: <1581572846-4301-1-git-send-email-Anson.Huang@nxp.com> X-Mailer: git-send-email 2.7.4 X-Virus-Scanned: ClamAV using ClamSMTP Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org After finishing using device node got from of_find_compatible_node(), of_node_put() needs to be called. Signed-off-by: Anson Huang --- arch/arm/mach-imx/anatop.c | 2 ++ arch/arm/mach-imx/gpc.c | 1 + arch/arm/mach-imx/platsmp.c | 1 + arch/arm/mach-imx/pm-imx6.c | 1 + arch/arm/mach-imx/pm-imx7ulp.c | 1 + 5 files changed, 6 insertions(+) diff --git a/arch/arm/mach-imx/anatop.c b/arch/arm/mach-imx/anatop.c index 8fb68c0..4fa727f 100644 --- a/arch/arm/mach-imx/anatop.c +++ b/arch/arm/mach-imx/anatop.c @@ -103,6 +103,7 @@ void __init imx_init_revision_from_anatop(void) np = of_find_compatible_node(NULL, NULL, "fsl,imx6q-anatop"); anatop_base = of_iomap(np, 0); + of_node_put(np); WARN_ON(!anatop_base); if (of_device_is_compatible(np, "fsl,imx6sl-anatop")) offset = ANADIG_DIGPROG_IMX6SL; @@ -138,6 +139,7 @@ void __init imx_init_revision_from_anatop(void) np = of_find_compatible_node(NULL, NULL, "fsl,imx6ul-src"); src_base = of_iomap(np, 0); + of_node_put(np); WARN_ON(!src_base); sbmr2 = readl_relaxed(src_base + SRC_SBMR2); iounmap(src_base); diff --git a/arch/arm/mach-imx/gpc.c b/arch/arm/mach-imx/gpc.c index b5b557f..07f1972 100644 --- a/arch/arm/mach-imx/gpc.c +++ b/arch/arm/mach-imx/gpc.c @@ -282,4 +282,5 @@ void __init imx_gpc_check_dt(void) /* map GPC, so that at least CPUidle and WARs keep working */ gpc_base = of_iomap(np, 0); } + of_node_put(np); } diff --git a/arch/arm/mach-imx/platsmp.c b/arch/arm/mach-imx/platsmp.c index 2aa2692..cf4e933 100644 --- a/arch/arm/mach-imx/platsmp.c +++ b/arch/arm/mach-imx/platsmp.c @@ -109,6 +109,7 @@ static void __init ls1021a_smp_prepare_cpus(unsigned int max_cpus) np = of_find_compatible_node(NULL, NULL, "fsl,ls1021a-dcfg"); dcfg_base = of_iomap(np, 0); + of_node_put(np); BUG_ON(!dcfg_base); paddr = __pa_symbol(secondary_startup); diff --git a/arch/arm/mach-imx/pm-imx6.c b/arch/arm/mach-imx/pm-imx6.c index 1c0ecad..c437f21 100644 --- a/arch/arm/mach-imx/pm-imx6.c +++ b/arch/arm/mach-imx/pm-imx6.c @@ -643,6 +643,7 @@ void __init imx6_pm_ccm_init(const char *ccm_compat) np = of_find_compatible_node(NULL, NULL, ccm_compat); ccm_base = of_iomap(np, 0); + of_node_put(np); BUG_ON(!ccm_base); /* diff --git a/arch/arm/mach-imx/pm-imx7ulp.c b/arch/arm/mach-imx/pm-imx7ulp.c index 7b2f738..2e756d8 100644 --- a/arch/arm/mach-imx/pm-imx7ulp.c +++ b/arch/arm/mach-imx/pm-imx7ulp.c @@ -62,6 +62,7 @@ void __init imx7ulp_pm_init(void) np = of_find_compatible_node(NULL, NULL, "fsl,imx7ulp-smc1"); smc1_base = of_iomap(np, 0); + of_node_put(np); WARN_ON(!smc1_base); imx7ulp_set_lpm(ULP_PM_RUN); -- 2.7.4