net/mlx4_core: Adjust port number in qp_attach wrapper when detaching
[cascardo/linux.git] / drivers / net / bonding / bond_main.c
index 95a6ca7..69aff72 100644 (file)
@@ -3077,7 +3077,7 @@ static int bond_open(struct net_device *bond_dev)
        if (bond_has_slaves(bond)) {
                read_lock(&bond->curr_slave_lock);
                bond_for_each_slave(bond, slave, iter) {
-                       if ((bond->params.mode == BOND_MODE_ACTIVEBACKUP)
+                       if (USES_PRIMARY(bond->params.mode)
                                && (slave != bond->curr_active_slave)) {
                                bond_set_slave_inactive_flags(slave,
                                                              BOND_SLAVE_NOTIFY_NOW);
@@ -4492,6 +4492,7 @@ static int __init bonding_init(void)
 out:
        return res;
 err:
+       bond_destroy_debugfs();
        bond_netlink_fini();
 err_link:
        unregister_pernet_subsys(&bond_net_ops);