Skip to content

Commit

Permalink
irqchip/ti-sci: Fix refcount leak in ti_sci_intr_irq_domain_probe
Browse files Browse the repository at this point in the history
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: cd844b0 ("irqchip/ti-sci-intr: Add support for Interrupt Router driver")
Signed-off-by: Miaoqian Lin <linmq006@gmail.com>
Signed-off-by: Marc Zyngier <maz@kernel.org>
Link: https://lore.kernel.org/r/20230102085611.3955984-1-linmq006@gmail.com
  • Loading branch information
Miaoqian Lin authored and Marc Zyngier committed Feb 5, 2023
1 parent 9419e70 commit 02298b7
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions drivers/irqchip/irq-ti-sci-intr.c
Original file line number Diff line number Diff line change
Expand Up @@ -236,6 +236,7 @@ static int ti_sci_intr_irq_domain_probe(struct platform_device *pdev)
}

parent_domain = irq_find_host(parent_node);
of_node_put(parent_node);
if (!parent_domain) {
dev_err(dev, "Failed to find IRQ parent domain\n");
return -ENODEV;
Expand Down

0 comments on commit 02298b7

Please sign in to comment.