Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

of/irq: Fix OF node refcount in of_msi_get_domain()

In of_msi_get_domain() if the iterator loop stops early because an
irq_domain match is detected, an of_node_put() on the iterator node is
needed to keep the OF node refcount in sync.

Add it.

Signed-off-by: Lorenzo Pieralisi <lpieralisi@kernel.org>
Reviewed-by: Frank Li <Frank.Li@nxp.com>
Cc: Rob Herring <robh@kernel.org>
Link: https://patch.msgid.link/20251021124103.198419-3-lpieralisi@kernel.org
Signed-off-by: Rob Herring (Arm) <robh@kernel.org>

authored by

Lorenzo Pieralisi and committed by
Rob Herring (Arm)
c71af4d6 119aaeed

+3 -1
+3 -1
drivers/of/irq.c
··· 774 774 775 775 of_for_each_phandle(&it, err, np, "msi-parent", "#msi-cells", 0) { 776 776 d = irq_find_matching_host(it.node, token); 777 - if (d) 777 + if (d) { 778 + of_node_put(it.node); 778 779 return d; 780 + } 779 781 } 780 782 781 783 return NULL;