linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] irqchip/gic-v2m: Fix refcount leak in gicv2m_of_init
@ 2024-08-19  9:10 Ma Ke
  2024-08-19  9:45 ` Marc Zyngier
  0 siblings, 1 reply; 2+ messages in thread
From: Ma Ke @ 2024-08-19  9:10 UTC (permalink / raw)
  To: maz, tglx, Suravee.Suthikulpanit, akpm
  Cc: linux-arm-kernel, linux-kernel, Ma Ke, stable

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

Cc: stable@vger.kernel.org
Fixes: 4266ab1a8ff5 ("irqchip/gic-v2m: Refactor to prepare for ACPI support")
Signed-off-by: Ma Ke <make24@iscas.ac.cn>
---
 drivers/irqchip/irq-gic-v2m.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/irqchip/irq-gic-v2m.c b/drivers/irqchip/irq-gic-v2m.c
index 51af63c046ed..65a55ee7bb30 100644
--- a/drivers/irqchip/irq-gic-v2m.c
+++ b/drivers/irqchip/irq-gic-v2m.c
@@ -396,6 +396,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;
 		}
 
-- 
2.25.1



^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2024-08-19  9:47 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-08-19  9:10 [PATCH] irqchip/gic-v2m: Fix refcount leak in gicv2m_of_init Ma Ke
2024-08-19  9:45 ` Marc Zyngier

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).