Skip to contentSkip to conversation

ARM: setup: Drop reference to device tree root node

PATCH New Yuho Choi 1 participant 1 message Aug 1 Arm (32-bit)

lore
Share & tools
lore

Yuho Choi

author
#0 lore raw

PATCH 1/1 ARM: setup: Drop reference to device tree root node

init_machine_late() obtains the root device tree node with of_find_node_by_path() but does not release the reference after reading the serial-number property. Drop the reference once the property lookup is complete.

Fixes 3f599875e520 ("ARM: 8355/1: arch: Show the serial number from devicetree in cpuinfo")
---
 arch/arm/kernel/setup.c | 1 +
 1 file changed, 1 insertion(+)
arch/arm/kernel/setup.c +1 -0
index 0bfd66c7ada0..2a179aeb637b 100644
@@ -962,6 +962,7 @@ static int __init init_machine_late(void)
 					      &system_serial);
 		if (ret)
 			system_serial = NULL;
+		of_node_put(root);
 	}
 
 	if (!system_serial)
Signature · 1 line
2.43.0