Re: [PATCH net v5 4/5] net: dsa: microchip: Free previously initialized ports on init failures

From: Jakub Kicinski

Date: Wed Nov 19 2025 - 23:22:10 EST


On Tue, 18 Nov 2025 17:13:25 +0100 Bastien Curutchet (Schneider
Electric) wrote:
> if (dev->info->ptp_capable) {
> ret = ksz_ptp_irq_setup(ds, dp->index);
> - if (ret)
> - goto out_pirq;
> + if (ret) {
> + ksz_irq_free(&dev->ports[dp->index].pirq);
> + goto port_release;

please jump to the correct location in the unwind loop
it's perfectly normal for kernel code

> + }
> }