aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/tools/testing/ktest/examples/include/ssh:/git@git.zx2c4.com
diff options
context:
space:
mode:
authorMyeonghun Pak <mhun512@gmail.com>2026-05-06 21:43:11 +0900
committerJakub Kicinski <kuba@kernel.org>2026-05-08 16:30:45 -0700
commitc4f3d6eb1fcf6cd9ce4644f604d5aad1ce594dfc (patch)
treed6ba0d9181c94f7aab2892994a8995eadbf19770 /tools/testing/ktest/examples/include/ssh:/git@git.zx2c4.com
parentMerge branch 'intel-wired-lan-driver-updates-2026-05-04-i40e-ice-idpf' (diff)
net: lan966x: avoid unregistering netdev on register failure
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: d28d6d2e37d1 ("net: lan966x: add port module support") Co-developed-by: Ijae Kim <ae878000@gmail.com> Signed-off-by: Ijae Kim <ae878000@gmail.com> Signed-off-by: Myeonghun Pak <mhun512@gmail.com> Link: https://patch.msgid.link/20260506124331.31945-1-mhun512@gmail.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'tools/testing/ktest/examples/include/ssh:/git@git.zx2c4.com')
0 files changed, 0 insertions, 0 deletions