summary refs log tree commit diff
path: root/drivers
diff options
context:
space:
mode:
authorMahesh Bandewar <maheshb@google.com>2015-02-19 10:13:25 -0800
committerDavid S. Miller <davem@davemloft.net>2015-02-20 17:43:29 -0500
commit950ddcb1c13f86a08896b48e2c1f1527263d4130 (patch)
tree9d7e7f0f6561fcd26e291eb4b9fbf6d7326b3e9c /drivers
parenta50dad355a5314da64586da36804b86fbebb7c2a (diff)
downloadlinux-950ddcb1c13f86a08896b48e2c1f1527263d4130.tar.gz
bonding: simple code refactor
Remove duplicate code.

Signed-off-by: Mahesh Bandewar <maheshb@google.com>
Signed-off-by: Andy Gospodarek <gospo@cumulusnetworks.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/net/bonding/bond_main.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/drivers/net/bonding/bond_main.c b/drivers/net/bonding/bond_main.c
index b979c265fc51..675b082283d6 100644
--- a/drivers/net/bonding/bond_main.c
+++ b/drivers/net/bonding/bond_main.c
@@ -2900,6 +2900,8 @@ static int bond_slave_netdev_event(unsigned long event,
 			if (old_duplex != slave->duplex)
 				bond_3ad_adapter_duplex_changed(slave);
 		}
+		/* Fallthrough */
+	case NETDEV_DOWN:
 		/* Refresh slave-array if applicable!
 		 * If the setup does not use miimon or arpmon (mode-specific!),
 		 * then these events will not cause the slave-array to be
@@ -2911,10 +2913,6 @@ static int bond_slave_netdev_event(unsigned long event,
 		if (bond_mode_uses_xmit_hash(bond))
 			bond_update_slave_arr(bond, NULL);
 		break;
-	case NETDEV_DOWN:
-		if (bond_mode_uses_xmit_hash(bond))
-			bond_update_slave_arr(bond, NULL);
-		break;
 	case NETDEV_CHANGEMTU:
 		/* TODO: Should slaves be allowed to
 		 * independently alter their MTU?  For