diff --git a/drivers/net/bonding/bond_main.c b/drivers/net/bonding/bond_main.c index a1fa8deb254e29ac330afdf5c4a9fb1b9c34138a..99ddd283e15ed22b56c0be83f3264d9d90c949d3 100644 --- a/drivers/net/bonding/bond_main.c +++ b/drivers/net/bonding/bond_main.c @@ -5164,15 +5164,15 @@ int bond_create(const char *name) goto out_netdev; } + bond_set_lockdep_class(bond_dev); + + netif_carrier_off(bond_dev); + res = register_netdevice(bond_dev); if (res < 0) { goto out_bond; } - bond_set_lockdep_class(bond_dev); - - netif_carrier_off(bond_dev); - up_write(&bonding_rwsem); rtnl_unlock(); /* allows sysfs registration of net device */ res = bond_create_sysfs_entry(netdev_priv(bond_dev));