summaryrefslogtreecommitdiffstats
path: root/src/drivers/linux
diff options
context:
space:
mode:
authorMichael Brown2010-09-05 03:03:31 +0200
committerMichael Brown2010-09-05 03:51:46 +0200
commit97ef28aea070f6d07b85fe16ef1b98da94a9f609 (patch)
tree80011445483aed4e257d449f796bd1cb24e3c60d /src/drivers/linux
parent[sis190] Initialise network device before calling register_netdev() (diff)
downloadipxe-97ef28aea070f6d07b85fe16ef1b98da94a9f609.tar.gz
ipxe-97ef28aea070f6d07b85fe16ef1b98da94a9f609.tar.xz
ipxe-97ef28aea070f6d07b85fe16ef1b98da94a9f609.zip
[netdevice] Call netdev_link_[up|down|err]() only while registered
Signed-off-by: Michael Brown <mcb30@ipxe.org>
Diffstat (limited to 'src/drivers/linux')
-rw-r--r--src/drivers/linux/tap.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/drivers/linux/tap.c b/src/drivers/linux/tap.c
index c2cb7584..53bb16a3 100644
--- a/src/drivers/linux/tap.c
+++ b/src/drivers/linux/tap.c
@@ -200,11 +200,11 @@ static int tap_probe(struct linux_device *device, struct linux_device_request *r
netdev->dev = &device->dev;
memset(nic, 0, sizeof(*nic));
- netdev_link_up(netdev);
-
if ((rc = register_netdev(netdev)) != 0)
goto err_register;
+ netdev_link_up(netdev);
+
/* Look for the mandatory if setting */
if_setting = linux_find_setting("if", &request->settings);