[<prev] [next>] [day] [month] [year] [list]
Message-Id: <20220309102929.16306-1-linmq006@gmail.com>
Date: Wed, 9 Mar 2022 10:29:25 +0000
From: Miaoqian Lin <linmq006@...il.com>
To: Russell King <linux@...linux.org.uk>,
Shawn Guo <shawnguo@...nel.org>,
Sascha Hauer <s.hauer@...gutronix.de>,
Pengutronix Kernel Team <kernel@...gutronix.de>,
Fabio Estevam <festevam@...il.com>,
NXP Linux Team <linux-imx@....com>,
Leonard Crestez <leonard.crestez@....com>,
Anson Huang <b20788@...escale.com>,
Philipp Zabel <p.zabel@...gutronix.de>,
Miaoqian Lin <linmq006@...il.com>,
Ranjani Vaidyanathan <ra5478@...escale.com>,
linux-arm-kernel@...ts.infradead.org, linux-kernel@...r.kernel.org
Subject: [PATCH] ARM: imx: Fix refcount leak in imx_src_init
The of_find_compatible_node() function returns a node pointer with
refcount incremented, We should use of_node_put() on it when done
Add the missing of_node_put() to release the refcount.
Fixes: 9fbbe6890c88 ("arm/imx6q: add core drivers clock, gpc, mmdc and src")
Signed-off-by: Miaoqian Lin <linmq006@...il.com>
---
arch/arm/mach-imx/src.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/arch/arm/mach-imx/src.c b/arch/arm/mach-imx/src.c
index 59a8e8cc4469..f28bfb653a88 100644
--- a/arch/arm/mach-imx/src.c
+++ b/arch/arm/mach-imx/src.c
@@ -171,6 +171,7 @@ void __init imx_src_init(void)
if (!np)
return;
src_base = of_iomap(np, 0);
+ of_node_put(np);
WARN_ON(!src_base);
/*
--
2.17.1
Powered by blists - more mailing lists