Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 171094
b: refs/heads/master
c: 30c15ba
h: refs/heads/master
v: v3
  • Loading branch information
Eric W. Biederman authored and David S. Miller committed Oct 30, 2009
1 parent 97fb7c7 commit 29dcd56
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 19 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: 6151b3d435feeeae7487032fcd5c8c7f281ba05c
refs/heads/master: 30c15ba9936a17d743f90eb3e2f6fa82acddc5f3
22 changes: 4 additions & 18 deletions trunk/drivers/net/bonding/bond_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -5089,22 +5089,14 @@ int bond_create(const char *name)
int res;

rtnl_lock();
/* Check to see if the bond already exists. */
/* FIXME: pass netns from caller */
if (name && __dev_get_by_name(&init_net, name)) {
pr_err(DRV_NAME ": cannot add bond %s; already exists\n",
name);
res = -EEXIST;
goto out_rtnl;
}

bond_dev = alloc_netdev(sizeof(struct bonding), name ? name : "",
bond_setup);
if (!bond_dev) {
pr_err(DRV_NAME ": %s: eek! can't alloc netdev!\n",
name);
res = -ENOMEM;
goto out_rtnl;
goto out;
}

if (!name) {
Expand All @@ -5114,19 +5106,13 @@ int bond_create(const char *name)
}

res = register_netdevice(bond_dev);
if (res < 0)
goto out_bond;

out:
rtnl_unlock();
return 0;

out_bond:
bond_deinit(bond_dev);
return res;
out_netdev:
free_netdev(bond_dev);
out_rtnl:
rtnl_unlock();
return res;
goto out;
}

static int __init bonding_init(void)
Expand Down

0 comments on commit 29dcd56

Please sign in to comment.