linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH net-next] net: atheros: simplify the return expression of atl2_phy_setup_autoneg_adv()
@ 2020-12-08 13:57 Zheng Yongjun
  2020-12-09  0:25 ` David Miller
  0 siblings, 1 reply; 2+ messages in thread
From: Zheng Yongjun @ 2020-12-08 13:57 UTC (permalink / raw)
  To: jcliburn, chris.snook, davem, kuba, netdev, linux-kernel; +Cc: Zheng Yongjun

Simplify the return expression.

Signed-off-by: Zheng Yongjun <zhengyongjun3@huawei.com>
---
 drivers/net/ethernet/atheros/atlx/atl2.c | 8 +-------
 1 file changed, 1 insertion(+), 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);
 }
 
 /*
-- 
2.22.0


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH net-next] net: atheros: simplify the return expression of atl2_phy_setup_autoneg_adv()
  2020-12-08 13:57 [PATCH net-next] net: atheros: simplify the return expression of atl2_phy_setup_autoneg_adv() Zheng Yongjun
@ 2020-12-09  0:25 ` David Miller
  0 siblings, 0 replies; 2+ messages in thread
From: David Miller @ 2020-12-09  0:25 UTC (permalink / raw)
  To: zhengyongjun3; +Cc: jcliburn, chris.snook, kuba, netdev, linux-kernel

From: Zheng Yongjun <zhengyongjun3@huawei.com>
Date: Tue, 8 Dec 2020 21:57:30 +0800

> Simplify the return expression.
> 
> Signed-off-by: Zheng Yongjun <zhengyongjun3@huawei.com>

Applied.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2020-12-09  0:26 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-12-08 13:57 [PATCH net-next] net: atheros: simplify the return expression of atl2_phy_setup_autoneg_adv() Zheng Yongjun
2020-12-09  0:25 ` David Miller

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).