Skip to content

Commit b1ac803

Browse files
YuuoniyMarc Zyngier
authored andcommitted
irqchip/apple-aic: Fix refcount leak in build_fiq_affinity
of_find_node_by_phandle() 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-3-linmq006@gmail.com
1 parent f4b98e3 commit b1ac803

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
@@ -1035,6 +1035,7 @@ static void build_fiq_affinity(struct aic_irq_chip *ic, struct device_node *aff)
10351035
continue;
10361036

10371037
cpu = of_cpu_node_to_id(cpu_node);
1038+
of_node_put(cpu_node);
10381039
if (WARN_ON(cpu < 0))
10391040
continue;
10401041

0 commit comments

Comments
 (0)