mirror of
https://github.com/ipxe/ipxe
synced 2025-12-29 02:52:36 +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:
@@ -252,13 +252,13 @@ static int pnic_probe ( struct pci_device *pci,
|
||||
status = pnic_command ( pnic, PNIC_CMD_READ_MAC, NULL, 0,
|
||||
netdev->hw_addr, ETH_ALEN, NULL );
|
||||
|
||||
/* Mark as link up; PNIC has no concept of link state */
|
||||
netdev_link_up ( netdev );
|
||||
|
||||
/* Register network device */
|
||||
if ( ( rc = register_netdev ( netdev ) ) != 0 )
|
||||
goto err;
|
||||
|
||||
/* Mark as link up; PNIC has no concept of link state */
|
||||
netdev_link_up ( netdev );
|
||||
|
||||
return 0;
|
||||
|
||||
err:
|
||||
|
||||
Reference in New Issue
Block a user