Commit 1b31a1bf authored by David S. Miller's avatar David S. Miller
Browse files

Merge branch 'break_after_return'



Fabian Frederick says:

====================
drivers/net: remove unnecessary break after return

Second patchset after "remove unnecessary break after goto" addressing break redundancy on drivers/net branch
(suggested by Joe Perches)
====================
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parents fa4eff44 b684106a
......@@ -1496,7 +1496,6 @@ e100_set_config(struct net_device *dev, struct ifmap *map)
case IF_PORT_AUI:
spin_unlock(&np->lock);
return -EOPNOTSUPP;
break;
default:
printk(KERN_ERR "%s: Invalid media selected", dev->name);
spin_unlock(&np->lock);
......
......@@ -178,10 +178,8 @@ static enum mac8390_type __init mac8390_ident(struct nubus_dev *dev)
case NUBUS_DRHW_APPLE_SONIC_LC:
case NUBUS_DRHW_SONNET:
return MAC8390_NONE;
break;
default:
return MAC8390_APPLE;
break;
}
break;
......@@ -189,13 +187,10 @@ static enum mac8390_type __init mac8390_ident(struct nubus_dev *dev)
switch (dev->dr_hw) {
case NUBUS_DRHW_ASANTE_LC:
return MAC8390_NONE;
break;
case NUBUS_DRHW_CABLETRON:
return MAC8390_CABLETRON;
break;
default:
return MAC8390_APPLE;
break;
}
break;
......@@ -220,10 +215,8 @@ static enum mac8390_type __init mac8390_ident(struct nubus_dev *dev)
switch (dev->dr_hw) {
case NUBUS_DRHW_INTERLAN:
return MAC8390_INTERLAN;
break;
default:
return MAC8390_KINETICS;
break;
}
break;
......@@ -563,7 +556,6 @@ static int __init mac8390_initdev(struct net_device *dev,
case ACCESS_UNKNOWN:
pr_err("Don't know how to access card memory!\n");
return -ENODEV;
break;
case ACCESS_16:
/* 16 bit card, register map is reversed */
......
......@@ -639,7 +639,6 @@ int atl1c_phy_init(struct atl1c_hw *hw)
dev_err(&pdev->dev, "Wrong Media type %d\n",
hw->media_type);
return -1;
break;
}
ret_val = atl1c_write_phy_reg(hw, MII_BMCR, mii_bmcr_data);
......@@ -682,7 +681,6 @@ int atl1c_get_speed_and_duplex(struct atl1c_hw *hw, u16 *speed, u16 *duplex)
break;
default:
return -1;
break;
}
if (phy_data & GIGA_PSSR_DPLX)
......
......@@ -618,7 +618,6 @@ int atl1e_get_speed_and_duplex(struct atl1e_hw *hw, u16 *speed, u16 *duplex)
break;
default:
return AT_ERR_PHY_SPEED;
break;
}
if (phy_data & MII_AT001_PSSR_DPLX)
......
......@@ -910,7 +910,6 @@ static s32 atl1_get_speed_and_duplex(struct atl1_hw *hw, u16 *speed, u16 *duplex
if (netif_msg_hw(adapter))
dev_dbg(&pdev->dev, "error getting speed\n");
return ATLX_ERR_PHY_SPEED;
break;
}
if (phy_data & MII_ATLX_PSSR_DPLX)
*duplex = FULL_DUPLEX;
......
......@@ -2493,7 +2493,6 @@ static s32 atl2_get_speed_and_duplex(struct atl2_hw *hw, u16 *speed,
break;
default:
return ATLX_ERR_PHY_SPEED;
break;
}
if (phy_data & MII_ATLX_PSSR_DPLX)
......@@ -2933,11 +2932,9 @@ static int atl2_validate_option(int *value, struct atl2_option *opt)
case OPTION_ENABLED:
printk(KERN_INFO "%s Enabled\n", opt->name);
return 0;
break;
case OPTION_DISABLED:
printk(KERN_INFO "%s Disabled\n", opt->name);
return 0;
break;
}
break;
case range_option:
......
......@@ -68,10 +68,8 @@ bfa_cb_image_get_chunk(enum bfi_asic_gen asic_gen, u32 off)
switch (asic_gen) {
case BFI_ASIC_GEN_CT:
return (bfi_image_ct_cna + off);
break;
case BFI_ASIC_GEN_CT2:
return (bfi_image_ct2_cna + off);
break;
default:
return NULL;
}
......@@ -83,10 +81,8 @@ bfa_cb_image_get_size(enum bfi_asic_gen asic_gen)
switch (asic_gen) {
case BFI_ASIC_GEN_CT:
return bfi_image_ct_cna_size;
break;
case BFI_ASIC_GEN_CT2:
return bfi_image_ct2_cna_size;
break;
default:
return 0;
}
......
......@@ -3250,7 +3250,6 @@ srom_map_media(struct net_device *dev)
printk("%s: Bad media code [%d] detected in SROM!\n", dev->name,
lp->infoblock_media);
return -1;
break;
}
return 0;
......
......@@ -2396,7 +2396,6 @@ static int ucc_geth_startup(struct ucc_geth_private *ugeth)
if (netif_msg_ifup(ugeth))
pr_err("Bad number of Rx threads value\n");
return -EINVAL;
break;
}
switch (ug_info->numThreadsTx) {
......@@ -2419,7 +2418,6 @@ static int ucc_geth_startup(struct ucc_geth_private *ugeth)
if (netif_msg_ifup(ugeth))
pr_err("Bad number of Tx threads value\n");
return -EINVAL;
break;
}
/* Calculate rx_extended_features */
......
......@@ -1316,7 +1316,6 @@ static int e1000_set_phy_loopback(struct e1000_adapter *adapter)
case e1000_82547:
case e1000_82547_rev_2:
return e1000_integrated_phy_loopback(adapter);
break;
default:
/* Default PHY loopback work is to read the MII
* control register and assert bit 14 (loopback mode).
......@@ -1325,7 +1324,6 @@ static int e1000_set_phy_loopback(struct e1000_adapter *adapter)
phy_reg |= MII_CR_LOOPBACK;
e1000_write_phy_reg(hw, PHY_CTRL, phy_reg);
return 0;
break;
}
return 8;
......@@ -1344,7 +1342,6 @@ static int e1000_setup_loopback_test(struct e1000_adapter *adapter)
case e1000_82545_rev_3:
case e1000_82546_rev_3:
return e1000_set_phy_loopback(adapter);
break;
default:
rctl = er32(RCTL);
rctl |= E1000_RCTL_LBM_TCVR;
......
......@@ -902,7 +902,6 @@ static s32 e1000_setup_fiber_serdes_link(struct e1000_hw *hw)
default:
e_dbg("Flow control param set incorrectly\n");
return -E1000_ERR_CONFIG;
break;
}
/* Since auto-negotiation is enabled, take the link out of reset (the
......@@ -5041,7 +5040,6 @@ static s32 e1000_get_cable_length(struct e1000_hw *hw, u16 *min_length,
break;
default:
return -E1000_ERR_PHY;
break;
}
} else if (hw->phy_type == e1000_phy_igp) { /* For IGP PHY */
u16 cur_agc_value;
......
......@@ -95,7 +95,6 @@ static s32 e1000_init_phy_params_82571(struct e1000_hw *hw)
break;
default:
return -E1000_ERR_PHY;
break;
}
/* This can only be done after all function pointers are setup. */
......@@ -422,7 +421,6 @@ static s32 e1000_get_phy_id_82571(struct e1000_hw *hw)
break;
case e1000_82573:
return e1000e_get_phy_id(hw);
break;
case e1000_82574:
case e1000_82583:
ret_val = e1e_rphy(hw, MII_PHYSID1, &phy_id);
......@@ -440,7 +438,6 @@ static s32 e1000_get_phy_id_82571(struct e1000_hw *hw)
break;
default:
return -E1000_ERR_PHY;
break;
}
return 0;
......@@ -1458,7 +1455,6 @@ static s32 e1000_setup_copper_link_82571(struct e1000_hw *hw)
break;
default:
return -E1000_ERR_PHY;
break;
}
if (ret_val)
......
......@@ -1521,11 +1521,9 @@ static int e1000_setup_loopback_test(struct e1000_adapter *adapter)
switch (hw->mac.type) {
case e1000_80003es2lan:
return e1000_set_es2lan_mac_loopback(adapter);
break;
case e1000_82571:
case e1000_82572:
return e1000_set_82571_fiber_loopback(adapter);
break;
default:
rctl = er32(RCTL);
rctl |= E1000_RCTL_LBM_TCVR;
......
......@@ -572,7 +572,6 @@ static s32 e1000_init_phy_params_ich8lan(struct e1000_hw *hw)
break;
default:
return -E1000_ERR_PHY;
break;
}
return 0;
......
......@@ -787,7 +787,6 @@ static s32 e1000_commit_fc_settings_generic(struct e1000_hw *hw)
default:
e_dbg("Flow control param set incorrectly\n");
return -E1000_ERR_CONFIG;
break;
}
ew32(TXCW, txcw);
......
......@@ -579,7 +579,6 @@ static s32 igb_get_invariants_82575(struct e1000_hw *hw)
break;
default:
return -E1000_ERR_MAC_INIT;
break;
}
/* Set media type */
......
......@@ -460,7 +460,6 @@ static int ixgbe_dcbnl_getnumtcs(struct net_device *netdev, int tcid, u8 *num)
break;
default:
return -EINVAL;
break;
}
} else {
return -EINVAL;
......
......@@ -1408,7 +1408,6 @@ static int ixgbe_reg_test(struct ixgbe_adapter *adapter, u64 *data)
default:
*data = 1;
return 1;
break;
}
/*
......@@ -2866,7 +2865,6 @@ static int ixgbe_get_ts_info(struct net_device *dev,
break;
default:
return ethtool_op_get_ts_info(dev, info);
break;
}
return 0;
}
......
......@@ -2258,7 +2258,6 @@ static int sis900_set_config(struct net_device *dev, struct ifmap *map)
case IF_PORT_100BASEFX: /* 100BaseFx */
/* These Modes are not supported (are they?)*/
return -EOPNOTSUPP;
break;
default:
return -EINVAL;
......
......@@ -2584,7 +2584,6 @@ static int niu_determine_phy_disposition(struct niu *np)
break;
default:
return -EINVAL;
break;
}
phy_addr_off = niu_atca_port_num[np->port];
break;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment