diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2010-10-19 10:13:00 +0200 |
---|---|---|
committer | Chris Wilson <chris@chris-wilson.co.uk> | 2010-10-19 10:14:50 +0200 |
commit | fb9a90f7c674f3ddef6baf55cb1612dadd8ea752 (patch) | |
tree | f25cf2ce17449ba34cdfdfb948134eb3464e400e /drivers/net/bonding/bond_main.c | |
parent | drm/i915: Update hotplug interrupts register definitions for Sandybridge (diff) | |
parent | drm, kdb, kms: Change mode_set_base_atomic() enter argument to be an enum (diff) | |
download | linux-fb9a90f7c674f3ddef6baf55cb1612dadd8ea752.tar.xz linux-fb9a90f7c674f3ddef6baf55cb1612dadd8ea752.zip |
Merge remote branch 'airlied/drm-core-next' into tmp
Diffstat (limited to 'drivers/net/bonding/bond_main.c')
-rw-r--r-- | drivers/net/bonding/bond_main.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/drivers/net/bonding/bond_main.c b/drivers/net/bonding/bond_main.c index 3b16f62d5606..e953c6ad6e6d 100644 --- a/drivers/net/bonding/bond_main.c +++ b/drivers/net/bonding/bond_main.c @@ -5164,6 +5164,15 @@ int bond_create(struct net *net, const char *name) res = dev_alloc_name(bond_dev, "bond%d"); if (res < 0) goto out; + } else { + /* + * If we're given a name to register + * we need to ensure that its not already + * registered + */ + res = -EEXIST; + if (__dev_get_by_name(net, name) != NULL) + goto out; } res = register_netdevice(bond_dev); |