summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/net/netdevice.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/net/netdevice.c b/src/net/netdevice.c
index 813823760..301738173 100644
--- a/src/net/netdevice.c
+++ b/src/net/netdevice.c
@@ -463,13 +463,13 @@ int netdev_open ( struct net_device *netdev ) {
DBGC ( netdev, "NETDEV %s opening\n", netdev->name );
- /* Mark as opened */
- netdev->state |= NETDEV_OPEN;
-
/* Open the device */
if ( ( rc = netdev->op->open ( netdev ) ) != 0 )
return rc;
+ /* Mark as opened */
+ netdev->state |= NETDEV_OPEN;
+
/* Add to head of open devices list */
list_add ( &netdev->open_list, &open_net_devices );