mirror of
https://github.com/ipxe/ipxe
synced 2026-01-12 00:18:33 +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:
@@ -300,13 +300,13 @@ int snpnet_probe ( struct snp_device *snpdev ) {
|
||||
memcpy ( netdev->hw_addr, snp->Mode->PermanentAddress.Addr,
|
||||
snp->Mode->HwAddressSize );
|
||||
|
||||
/* Mark as link up; we don't handle link state */
|
||||
netdev_link_up ( netdev );
|
||||
|
||||
/* Register network device */
|
||||
if ( ( rc = register_netdev ( netdev ) ) != 0 )
|
||||
goto err_register;
|
||||
|
||||
/* Mark as link up; we don't handle link state */
|
||||
netdev_link_up ( netdev );
|
||||
|
||||
DBGC ( snp, "SNP %p added\n", snp );
|
||||
return 0;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user