mirror of
https://github.com/ipxe/ipxe
synced 2025-12-28 10:32:52 +03:00
[netdevice] Call netdev_link_[up|down|err]() only while registered
Signed-off-by: Michael Brown <mcb30@ipxe.org>
This commit is contained in:
@@ -208,12 +208,12 @@ static int natsemi_probe (struct pci_device *pci,
|
||||
last = last1;
|
||||
}
|
||||
|
||||
/* Mark as link up; we don't yet handle link state */
|
||||
netdev_link_up ( netdev );
|
||||
|
||||
if ((rc = register_netdev (netdev)) != 0)
|
||||
goto err_register_netdev;
|
||||
|
||||
/* Mark as link up; we don't yet handle link state */
|
||||
netdev_link_up ( netdev );
|
||||
|
||||
return 0;
|
||||
|
||||
err_register_netdev:
|
||||
|
||||
Reference in New Issue
Block a user