diff options
author | Miaoqian Lin <linmq006@gmail.com> | 2023-01-02 11:56:10 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2023-03-10 11:28:15 +0300 |
commit | 4ae40c20f1519e1767ba01609abc7e8d6485fc0c (patch) | |
tree | 5a211dbc0a05ed2c623533bc0effb65252f8a13c /drivers/irqchip | |
parent | 91e149b201bdb68c77011d50d011e47fadbcc8bd (diff) | |
download | linux-4ae40c20f1519e1767ba01609abc7e8d6485fc0c.tar.xz |
irqchip/ti-sci: Fix refcount leak in ti_sci_intr_irq_domain_probe
[ Upstream commit 02298b7bae12936ca313975b02e7f98b06670d37 ]
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: cd844b0715ce ("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
Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'drivers/irqchip')
-rw-r--r-- | drivers/irqchip/irq-ti-sci-intr.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/irqchip/irq-ti-sci-intr.c b/drivers/irqchip/irq-ti-sci-intr.c index fe8fad22bcf9..020ddf29efb8 100644 --- a/drivers/irqchip/irq-ti-sci-intr.c +++ b/drivers/irqchip/irq-ti-sci-intr.c @@ -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; |