Skip to contentSkip to conversation

irqchip/gic-v2m: Fix refcount leak in gicv2m_of_init

PATCH New Ma Ke 1 participant 1 message Oct 7, 2023

Subsystems (2)
lore
Share & tools
lore

Ma Ke

author
#0 lore raw

PATCH 1/1 irqchip/gic-v2m: Fix refcount leak in gicv2m_of_init

Add the missing of_node_put() to release the refcount incremented by of_find_matching_node().

---
 drivers/irqchip/irq-gic-v2m.c | 1 +
 1 file changed, 1 insertion(+)
drivers/irqchip/irq-gic-v2m.c +1 -0
index f2ff4387870d..d3e54c557b4c 100644
@@ -427,6 +427,7 @@ static int __init gicv2m_of_init(struct fwnode_handle *parent_handle,
 		ret = of_address_to_resource(child, 0, &res);
 		if (ret) {
 			pr_err("Failed to allocate v2m resource.\n");
+			of_node_put(child);
 			break;
 		}
 
Signature · 1 line
2.37.2