diff options
Diffstat (limited to 'drivers/net/bonding')
-rw-r--r-- | drivers/net/bonding/bond_main.c | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/drivers/net/bonding/bond_main.c b/drivers/net/bonding/bond_main.c index 65c7ebafaacd..81b45740ed77 100644 --- a/drivers/net/bonding/bond_main.c +++ b/drivers/net/bonding/bond_main.c | |||
@@ -4896,14 +4896,16 @@ int bond_create(char *name, struct bond_params *params, struct bonding **newbond | |||
4896 | down_write(&bonding_rwsem); | 4896 | down_write(&bonding_rwsem); |
4897 | 4897 | ||
4898 | /* Check to see if the bond already exists. */ | 4898 | /* Check to see if the bond already exists. */ |
4899 | list_for_each_entry_safe(bond, nxt, &bond_dev_list, bond_list) | 4899 | if (name) { |
4900 | if (strnicmp(bond->dev->name, name, IFNAMSIZ) == 0) { | 4900 | list_for_each_entry_safe(bond, nxt, &bond_dev_list, bond_list) |
4901 | printk(KERN_ERR DRV_NAME | 4901 | if (strnicmp(bond->dev->name, name, IFNAMSIZ) == 0) { |
4902 | printk(KERN_ERR DRV_NAME | ||
4902 | ": cannot add bond %s; it already exists\n", | 4903 | ": cannot add bond %s; it already exists\n", |
4903 | name); | 4904 | name); |
4904 | res = -EPERM; | 4905 | res = -EPERM; |
4905 | goto out_rtnl; | 4906 | goto out_rtnl; |
4906 | } | 4907 | } |
4908 | } | ||
4907 | 4909 | ||
4908 | bond_dev = alloc_netdev(sizeof(struct bonding), name ? name : "", | 4910 | bond_dev = alloc_netdev(sizeof(struct bonding), name ? name : "", |
4909 | ether_setup); | 4911 | ether_setup); |