Commit 78d928bd authored by Zijun Hu's avatar Zijun Hu Committed by Greg Kroah-Hartman
Browse files

of/irq: Fix device node refcount leakages in of_irq_count()



commit bbf71f44 upstream.

of_irq_count() invokes of_irq_parse_one() to count IRQs, and successful
invocation of the later will get device node @irq.np refcount, but the
former does not put the refcount before next iteration invocation, hence
causes device node refcount leakages.

Fix by putting @irq.np refcount before the next iteration invocation.

Fixes: 3da52787 ("of/irq: Rework of_irq_count()")
Cc: stable@vger.kernel.org
Signed-off-by: default avatarZijun Hu <quic_zijuhu@quicinc.com>
Link: https://lore.kernel.org/r/20250209-of_irq_fix-v2-5-93e3a2659aa7@quicinc.com


Signed-off-by: default avatarRob Herring (Arm) <robh@kernel.org>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent b84b58ae
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment