summaryrefslogtreecommitdiffstats
path: root/drivers/net/bonding/bond_main.c
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2010-10-19 10:13:00 +0200
committerChris Wilson <chris@chris-wilson.co.uk>2010-10-19 10:14:50 +0200
commitfb9a90f7c674f3ddef6baf55cb1612dadd8ea752 (patch)
treef25cf2ce17449ba34cdfdfb948134eb3464e400e /drivers/net/bonding/bond_main.c
parentdrm/i915: Update hotplug interrupts register definitions for Sandybridge (diff)
parentdrm, kdb, kms: Change mode_set_base_atomic() enter argument to be an enum (diff)
downloadlinux-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.c9
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);