summaryrefslogtreecommitdiff
path: root/drivers/irqchip
diff options
context:
space:
mode:
authorMiaoqian Lin <linmq006@gmail.com>2023-01-02 12:28:10 +0400
committerMarc Zyngier <maz@kernel.org>2023-02-05 11:11:24 +0000
commit071d068b89e95d1b078aa6bbcb9d0961b77d6aa1 (patch)
treec55b3495ed7a1802bb935525860020f9f25072b0 /drivers/irqchip
parent6caa5a2b78f5f53c433d3a3781e53325da22f0ac (diff)
irqchip/alpine-msi: Fix refcount leak in alpine_msix_init_domains
of_irq_find_parent() returns a node pointer with refcount incremented, We should use of_node_put() on it when not needed anymore. Add missing of_node_put() to avoid refcount leak. Fixes: e6b78f2c3e14 ("irqchip: Add the Alpine MSIX interrupt controller") Signed-off-by: Miaoqian Lin <linmq006@gmail.com> Signed-off-by: Marc Zyngier <maz@kernel.org> Link: https://lore.kernel.org/r/20230102082811.3947760-1-linmq006@gmail.com
Diffstat (limited to 'drivers/irqchip')
-rw-r--r--drivers/irqchip/irq-alpine-msi.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/irqchip/irq-alpine-msi.c b/drivers/irqchip/irq-alpine-msi.c
index 5ddb8e578ac6..fc1ef7de3797 100644
--- a/drivers/irqchip/irq-alpine-msi.c
+++ b/drivers/irqchip/irq-alpine-msi.c
@@ -199,6 +199,7 @@ static int alpine_msix_init_domains(struct alpine_msix_data *priv,
}
gic_domain = irq_find_host(gic_node);
+ of_node_put(gic_node);
if (!gic_domain) {
pr_err("Failed to find the GIC domain\n");
return -ENXIO;