mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] arm: mach-imx: Add missing of_node_put in cpu-imx27.c
@ 2022-06-15 14:51 Liang He
  0 siblings, 0 replies; only message in thread
From: Liang He @ 2022-06-15 14:51 UTC (permalink / raw)
  To: linux, shawnguo, s.hauer, kernel, festevam, linux-imx
  Cc: linux-arm-kernel, linux-kernel, windhl

In mx27_read_cpu_rev(), of_find_compatible_node() will return a node
pointer with refcount incremented. We should use of_node_put() when
it is not used anymore.

Signed-off-by: Liang He <windhl@126.com>
---
 arch/arm/mach-imx/cpu-imx27.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/arch/arm/mach-imx/cpu-imx27.c b/arch/arm/mach-imx/cpu-imx27.c
index bf70e13bbe9e..220622c9d2f0 100644
--- a/arch/arm/mach-imx/cpu-imx27.c
+++ b/arch/arm/mach-imx/cpu-imx27.c
@@ -28,6 +28,9 @@ static int mx27_read_cpu_rev(void)
 
 	np = of_find_compatible_node(NULL, NULL, "fsl,imx27-ccm");
 	ccm_base = of_iomap(np, 0);
+	
+	of_node_put(np);
+	
 	BUG_ON(!ccm_base);
 	/*
 	 * now we have access to the IO registers. As we need
-- 
2.25.1


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2022-06-15 14:53 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-06-15 14:51 [PATCH] arm: mach-imx: Add missing of_node_put in cpu-imx27.c Liang He

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®