aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/atheros
diff options
context:
space:
mode:
authorZheng Yongjun <zhengyongjun3@huawei.com>2020-12-08 21:57:30 +0800
committerDavid S. Miller <davem@davemloft.net>2020-12-08 16:22:54 -0800
commitafae3cc2da100ead3cd6ef4bb1fb8bc9d4b817c5 (patch)
treeaf86c5111b7541afba9fa3152ac9b95ecb678bf5 /drivers/net/ethernet/atheros
parentdrivers: net: qlcnic: simplify the return expression of qlcnic_sriov_vf_shutdown() (diff)
downloadlinux-dev-afae3cc2da100ead3cd6ef4bb1fb8bc9d4b817c5.tar.xz
linux-dev-afae3cc2da100ead3cd6ef4bb1fb8bc9d4b817c5.zip
net: atheros: simplify the return expression of atl2_phy_setup_autoneg_adv()
Simplify the return expression. Signed-off-by: Zheng Yongjun <zhengyongjun3@huawei.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/atheros')
-rw-r--r--drivers/net/ethernet/atheros/atlx/atl2.c8
1 files changed, 1 insertions, 7 deletions
diff --git a/drivers/net/ethernet/atheros/atlx/atl2.c b/drivers/net/ethernet/atheros/atlx/atl2.c
index 7b80d924632a..f016f2e12ee7 100644
--- a/drivers/net/ethernet/atheros/atlx/atl2.c
+++ b/drivers/net/ethernet/atheros/atlx/atl2.c
@@ -2549,7 +2549,6 @@ static s32 atl2_write_phy_reg(struct atl2_hw *hw, u32 reg_addr, u16 phy_data)
*/
static s32 atl2_phy_setup_autoneg_adv(struct atl2_hw *hw)
{
- s32 ret_val;
s16 mii_autoneg_adv_reg;
/* Read the MII Auto-Neg Advertisement Register (Address 4). */
@@ -2605,12 +2604,7 @@ static s32 atl2_phy_setup_autoneg_adv(struct atl2_hw *hw)
hw->mii_autoneg_adv_reg = mii_autoneg_adv_reg;
- ret_val = atl2_write_phy_reg(hw, MII_ADVERTISE, mii_autoneg_adv_reg);
-
- if (ret_val)
- return ret_val;
-
- return 0;
+ return atl2_write_phy_reg(hw, MII_ADVERTISE, mii_autoneg_adv_reg);
}
/*