Re: [PATCH net v3 1/4] net: dsa: microchip: common: Fix checks on irq_find_mapping()

From: Andrew Lunn

Date: Fri Nov 14 2025 - 09:51:13 EST


On Fri, Nov 14, 2025 at 08:20:20AM +0100, Bastien Curutchet (Schneider Electric) wrote:
> irq_find_mapping() returns a positive IRQ number or 0 if no IRQ is found
> but it never returns a negative value. However, on each
> irq_find_mapping() call, we verify that the returned value isn't
> negative.
>
> Fix the irq_find_mapping() checks to enter error paths when 0 is
> returned. Return -EINVAL in such cases.
>
> Fixes: c9cd961c0d43 ("net: dsa: microchip: lan937x: add interrupt support for port phy link")
> Signed-off-by: Bastien Curutchet (Schneider Electric) <bastien.curutchet@xxxxxxxxxxx>

Reviewed-by: Andrew Lunn <andrew@xxxxxxx>

Andrew