Re: [PATCH net] net: dsa: microchip: Fix error path in PTP IRQ setup

From: Simon Horman

Date: Tue Mar 10 2026 - 14:08:53 EST


On Mon, Mar 09, 2026 at 02:15:43PM +0100, Bastien Curutchet (Schneider Electric) wrote:
> If request_threaded_irq() fails during the PTP message IRQ setup, the
> newly created IRQ mapping is never disposed. Indeed, the
> ksz_ptp_irq_setup()'s error path only frees the mappings that were
> successfully set up.
>
> Dispose the newly created mapping if the associated
> request_threaded_irq() fails at setup.
>
> Cc: stable@xxxxxxxxxxxxxxx
> Fixes: d0b8fec8ae505 ("net: dsa: microchip: Fix symetry in ksz_ptp_msg_irq_{setup/free}()")
> Signed-off-by: Bastien Curutchet (Schneider Electric) <bastien.curutchet@xxxxxxxxxxx>

Reviewed-by: Simon Horman <horms@xxxxxxxxxx>