RE: [PATCH net v5 1/2] net: fec: Propagate PTP initialization errors

From: Wei Fang

Date: Wed Sep 09 2026 - 03:53:16 EST


> Change fec_ptp_init() to return an error code instead of silently
> ignoring failures during PTP initialization.
>
> The PPS IRQ is not required for the FEC/PTP functionality, so its
> absence should not make the probe fail. However, an unavailable
> optional IRQ should be distinguished from an actual error returned
> during the IRQ lookup.
>
> If a platform does not support the PPS IRQ, it can omit the IRQ from
> its device tree and the optional lookup will return -ENXIO. Propagate
> other errors from the IRQ lookup instead of silently ignoring them.
> In particular, silently ignoring -EPROBE_DEFER can cause the driver to
> continue probing instead of deferring as required.
>
> Also propagate failures from devm_request_irq() and ptp_clock_register().
>
> Update the function declaration in fec.h accordingly.
>
> Found by manual code inspection.
>
> Fixes: b86bcb299092 ("net: fec_ptp: Use platform_get_irq_xxx_optional() to
> avoid error message")
> Signed-off-by: bui duc phuc <phucduc.bui@xxxxxxxxx>

Reviewed-by: Wei Fang <wei.fang@xxxxxxx>