mirror of
https://github.com/torvalds/linux.git
synced 2026-06-03 12:03:54 +02:00
lan966x_probe_port() stores the newly allocated net_device in the
port before calling register_netdev(). If register_netdev() fails,
the probe error path calls lan966x_cleanup_ports(), which sees
port->dev and calls unregister_netdev() for a device that was never
registered.
Destroy the phylink instance created for this port and clear port->dev
before returning the registration error. The common cleanup path now skips
ports without port->dev before reaching the registered netdev cleanup, so
it only handles ports that reached the registered-netdev lifetime.
This also avoids treating an uninitialized FDMA netdev and the failed port
as a NULL == NULL match in the common cleanup path.
Fixes:
|
||
|---|---|---|
| .. | ||
| Kconfig | ||
| lan966x_cbs.c | ||
| lan966x_dcb.c | ||
| lan966x_ethtool.c | ||
| lan966x_ets.c | ||
| lan966x_fdb.c | ||
| lan966x_fdma.c | ||
| lan966x_goto.c | ||
| lan966x_ifh.h | ||
| lan966x_lag.c | ||
| lan966x_mac.c | ||
| lan966x_main.c | ||
| lan966x_main.h | ||
| lan966x_mdb.c | ||
| lan966x_mirror.c | ||
| lan966x_mqprio.c | ||
| lan966x_phylink.c | ||
| lan966x_police.c | ||
| lan966x_port.c | ||
| lan966x_ptp.c | ||
| lan966x_regs.h | ||
| lan966x_switchdev.c | ||
| lan966x_taprio.c | ||
| lan966x_tbf.c | ||
| lan966x_tc_flower.c | ||
| lan966x_tc_matchall.c | ||
| lan966x_tc.c | ||
| lan966x_vcap_ag_api.c | ||
| lan966x_vcap_ag_api.h | ||
| lan966x_vcap_debugfs.c | ||
| lan966x_vcap_impl.c | ||
| lan966x_vlan.c | ||
| lan966x_xdp.c | ||
| Makefile | ||