Skip to content

Commit

Permalink
net: atheros: simplify the return expression of atl2_phy_setup_autone…
Browse files Browse the repository at this point in the history
…g_adv()

Simplify the return expression.

Signed-off-by: Zheng Yongjun <zhengyongjun3@huawei.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Zheng Yongjun authored and David S. Miller committed Dec 9, 2020
1 parent 6eea392 commit afae3cc
Showing 1 changed file with 1 addition and 7 deletions.
8 changes: 1 addition & 7 deletions drivers/net/ethernet/atheros/atlx/atl2.c
Original file line number Diff line number Diff line change
Expand Up @@ -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). */
Expand Down Expand Up @@ -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);
}

/*
Expand Down

0 comments on commit afae3cc

Please sign in to comment.