Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 63402
b: refs/heads/master
c: 7ce1b0e
h: refs/heads/master
v: v3
  • Loading branch information
Herbert Xu authored and David S. Miller committed Jul 31, 2007
1 parent b8fccbd commit 189ced6
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 4 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: ccc7911fbd1c5af9b60453d3a8cca0a36402fee5
refs/heads/master: 7ce1b0edcb11f90f6fc5e0ceecff467f329889a0
11 changes: 8 additions & 3 deletions trunk/net/core/dev.c
Original file line number Diff line number Diff line change
Expand Up @@ -3337,7 +3337,7 @@ int register_netdevice(struct net_device *dev)

if (!dev_valid_name(dev->name)) {
ret = -EINVAL;
goto out;
goto err_uninit;
}

dev->ifindex = dev_new_index();
Expand All @@ -3351,7 +3351,7 @@ int register_netdevice(struct net_device *dev)
= hlist_entry(p, struct net_device, name_hlist);
if (!strncmp(d->name, dev->name, IFNAMSIZ)) {
ret = -EEXIST;
goto out;
goto err_uninit;
}
}

Expand Down Expand Up @@ -3411,7 +3411,7 @@ int register_netdevice(struct net_device *dev)

ret = netdev_register_sysfs(dev);
if (ret)
goto out;
goto err_uninit;
dev->reg_state = NETREG_REGISTERED;

/*
Expand All @@ -3436,6 +3436,11 @@ int register_netdevice(struct net_device *dev)

out:
return ret;

err_uninit:
if (dev->uninit)
dev->uninit(dev);
goto out;
}

/**
Expand Down

0 comments on commit 189ced6

Please sign in to comment.