Skip to content

Commit

Permalink
irqchip/irq-mvebu-gicp: Fix refcount leak in mvebu_gicp_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: a68a63c ("irqchip/irq-mvebu-gicp: Add new driver for Marvell GICP")
Signed-off-by: Miaoqian Lin <[email protected]>
Signed-off-by: Marc Zyngier <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
  • Loading branch information
Yuuoniy authored and Marc Zyngier committed Feb 5, 2023
1 parent 071d068 commit 9419e70
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions drivers/irqchip/irq-mvebu-gicp.c
Original file line number Diff line number Diff line change
Expand Up @@ -221,6 +221,7 @@ static int mvebu_gicp_probe(struct platform_device *pdev)
}

parent_domain = irq_find_host(irq_parent_dn);
of_node_put(irq_parent_dn);
if (!parent_domain) {
dev_err(&pdev->dev, "failed to find parent IRQ domain\n");
return -ENODEV;
Expand Down

0 comments on commit 9419e70

Please sign in to comment.