Skip to contentSkip to conversation

arm: mach-imx: Add missing of_node_put() in cpu-imx5.c

PATCH New Liang He 1 participant 1 message Jun 15, 2022

Subsystems (3)
lore
Share & tools
lore

Liang He

author
#0 lore raw

PATCH 1/1 arm: mach-imx: Add missing of_node_put() in cpu-imx5.c

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

---
 arch/arm/mach-imx/cpu-imx5.c | 2 ++
 1 file changed, 2 insertions(+)
arch/arm/mach-imx/cpu-imx5.c +2 -0
index ad56263778f9..103bf5be9b1b 100644
@@ -30,6 +30,8 @@ static u32 imx5_read_srev_reg(const char *compat)
 	iim_base = of_iomap(np, 0);
 	WARN_ON(!iim_base);
 
+	of_node_put(np);
+
 	srev = readl(iim_base + IIM_SREV) & 0xff;
 
 	iounmap(iim_base);
Signature · 7 lines
2.25.1


_______________________________________________
linux-arm-kernel mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel