aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/bonding/bond_main.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/bonding/bond_main.c')
-rw-r--r--drivers/net/bonding/bond_main.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/drivers/net/bonding/bond_main.c b/drivers/net/bonding/bond_main.c
index 07b9d1f65b66..d3801a00d3d5 100644
--- a/drivers/net/bonding/bond_main.c
+++ b/drivers/net/bonding/bond_main.c
@@ -4756,14 +4756,19 @@ int bond_create(char *name, struct bond_params *params, struct bonding **newbond
4756 4756
4757 rtnl_unlock(); /* allows sysfs registration of net device */ 4757 rtnl_unlock(); /* allows sysfs registration of net device */
4758 res = bond_create_sysfs_entry(bond_dev->priv); 4758 res = bond_create_sysfs_entry(bond_dev->priv);
4759 goto done; 4759 if (res < 0) {
4760 rtnl_lock();
4761 goto out_bond;
4762 }
4763
4764 return 0;
4765
4760out_bond: 4766out_bond:
4761 bond_deinit(bond_dev); 4767 bond_deinit(bond_dev);
4762out_netdev: 4768out_netdev:
4763 free_netdev(bond_dev); 4769 free_netdev(bond_dev);
4764out_rtnl: 4770out_rtnl:
4765 rtnl_unlock(); 4771 rtnl_unlock();
4766done:
4767 return res; 4772 return res;
4768} 4773}
4769 4774