Skip to contentSkip to conversation

arm: mm: Add missing of_node_put()

PATCH Superseded heliang 1 participant 1 message Jun 15, 2022 Arm (32-bit)

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore

heliang

author
#0 lore raw

PATCH 1/1 arm: mm: Add missing of_node_put()

In feroceon_of_init, we use of_find_matching_node() to get a node pointer with refcount incremented. We should use of_node_put() when it is not used anymore.

---
 arch/arm/mm/cache-feroceon-l2.c | 1 +
 1 file changed, 1 insertion(+)
arch/arm/mm/cache-feroceon-l2.c +1 -0
index 5c1b7a7b9af6..a10c4be14087 100644
@@ -376,6 +376,7 @@ int __init feroceon_of_init(void)
 	node = of_find_matching_node(NULL, feroceon_ids);
 	if (node && of_device_is_compatible(node, "marvell,kirkwood-cache")) {
 		base = of_iomap(node, 0);
+		of_node_put(node);
 		if (!base)
 			return -ENOMEM;
 
Signature · 7 lines
2.25.1


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