mirror of
https://github.com/raspberrypi/linux.git
synced 2025-12-06 10:00:17 +00:00
irqchip/ti-sci: Fix refcount leak in ti_sci_intr_irq_domain_probe
[ Upstream commit02298b7bae] 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:cd844b0715("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>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
91e149b201
commit
4ae40c20f1
@@ -236,6 +236,7 @@ static int ti_sci_intr_irq_domain_probe(struct platform_device *pdev)
|
|||||||
}
|
}
|
||||||
|
|
||||||
parent_domain = irq_find_host(parent_node);
|
parent_domain = irq_find_host(parent_node);
|
||||||
|
of_node_put(parent_node);
|
||||||
if (!parent_domain) {
|
if (!parent_domain) {
|
||||||
dev_err(dev, "Failed to find IRQ parent domain\n");
|
dev_err(dev, "Failed to find IRQ parent domain\n");
|
||||||
return -ENODEV;
|
return -ENODEV;
|
||||||
|
|||||||
Reference in New Issue
Block a user