summaryrefslogtreecommitdiff
path: root/drivers/net/bonding/bond_sysfs.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2008-05-20 17:23:03 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2008-05-20 17:23:03 -0700
commite616c6303306df62223ebe2e68bb2f19c420dd81 (patch)
treed60d372fac5ceb4da71ac3802422b9b0ae52b20d /drivers/net/bonding/bond_sysfs.c
parent789319db76ccb8f61d2f6a91d2f2fcb70edae9c5 (diff)
parentd3ede327e83f202c3a0962e207318f65717c5eb7 (diff)
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6
* git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6: (27 commits) pktgen: make sure that pktgen_thread_worker has been executed [VLAN]: Propagate selected feature bits to VLAN devices drivers/atm/: remove CVS keywords vlan: Correctly handle device notifications for layered VLAN devices net: Fix call to ->change_rx_flags(dev, IFF_MULTICAST) in dev_change_flags() net_sched: cls_api: fix return value for non-existant classifiers ipsec: Use the correct ip_local_out function ipv6 addrconf: Allow infinite prefix lifetime. ipv6 route: Fix lifetime in netlink. ipv6 addrconf: Fix route lifetime setting in corner case. ndisc: Add missing strategies for per-device retrans timer/reachable time settings. ipv6: Move <linux/in6.h> from header-y to unifdef-y. l2tp: avoid skb truesize bug if headroom is increased wireless: Create 'device' symlink in sysfs wireless, airo: waitbusy() won't delay libertas: fix command timeout after firmware failure mac80211: Add RTNL version of ieee80211_iterate_active_interfaces mac80211 : Association with 11n hidden ssid ap. hostap: fix "registers" registration in procfs isdn/capi: Return proper errnos on module init. ...
Diffstat (limited to 'drivers/net/bonding/bond_sysfs.c')
-rw-r--r--drivers/net/bonding/bond_sysfs.c12
1 files changed, 10 insertions, 2 deletions
diff --git a/drivers/net/bonding/bond_sysfs.c b/drivers/net/bonding/bond_sysfs.c
index 68c41a00d93d..08f3d396bcd6 100644
--- a/drivers/net/bonding/bond_sysfs.c
+++ b/drivers/net/bonding/bond_sysfs.c
@@ -1437,8 +1437,16 @@ int bond_create_sysfs(void)
* configure multiple bonding devices.
*/
if (ret == -EEXIST) {
- netdev_class = NULL;
- return 0;
+ /* Is someone being kinky and naming a device bonding_master? */
+ if (__dev_get_by_name(&init_net,
+ class_attr_bonding_masters.attr.name))
+ printk(KERN_ERR
+ "network device named %s already exists in sysfs",
+ class_attr_bonding_masters.attr.name);
+ else {
+ netdev_class = NULL;
+ return 0;
+ }
}
return ret;