Skip to content

Commit 3d45670

Browse files
YuuoniyMarc Zyngier
authored andcommitted
irqchip/apple-aic: Fix refcount leak in aic_of_ic_init
of_get_child_by_name() returns a node pointer with refcount incremented, we should use of_node_put() on it when not need anymore. Add missing of_node_put() to avoid refcount leak. Fixes: a5e8801 ("irqchip/apple-aic: Parse FIQ affinities from device-tree") Signed-off-by: Miaoqian Lin <linmq006@gmail.com> Signed-off-by: Marc Zyngier <maz@kernel.org> Link: https://lore.kernel.org/r/20220601080930.31005-4-linmq006@gmail.com
1 parent b1ac803 commit 3d45670

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

drivers/irqchip/irq-apple-aic.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1144,6 +1144,7 @@ static int __init aic_of_ic_init(struct device_node *node, struct device_node *p
11441144
for_each_child_of_node(affs, chld)
11451145
build_fiq_affinity(irqc, chld);
11461146
}
1147+
of_node_put(affs);
11471148

11481149
set_handle_irq(aic_handle_irq);
11491150
set_handle_fiq(aic_handle_fiq);

0 commit comments

Comments
 (0)