All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH net-next] net: mediatek: simplify the return expression of mtk_gmac_sgmii_path_setup()
@ 2020-12-10 13:50 Zheng Yongjun
  2020-12-10 21:03 ` David Miller
  0 siblings, 1 reply; 2+ messages in thread
From: Zheng Yongjun @ 2020-12-10 13:50 UTC (permalink / raw)
  To: davem, kuba, mcoquelin.stm32
  Cc: netdev, linux-kernel, nbd, john, sean.wang, Mark-MC.Lee, Zheng Yongjun

Simplify the return expression.

Signed-off-by: Zheng Yongjun <zhengyongjun3@huawei.com>
---
 drivers/net/ethernet/mediatek/mtk_eth_path.c | 8 ++------
 1 file changed, 2 insertions(+), 6 deletions(-)

diff --git a/drivers/net/ethernet/mediatek/mtk_eth_path.c b/drivers/net/ethernet/mediatek/mtk_eth_path.c
index 0fe97155dd8f..6bc9f2487384 100644
--- a/drivers/net/ethernet/mediatek/mtk_eth_path.c
+++ b/drivers/net/ethernet/mediatek/mtk_eth_path.c
@@ -241,17 +241,13 @@ static int mtk_eth_mux_setup(struct mtk_eth *eth, int path)
 
 int mtk_gmac_sgmii_path_setup(struct mtk_eth *eth, int mac_id)
 {
-	int err, path;
+	int path;
 
 	path = (mac_id == 0) ?  MTK_ETH_PATH_GMAC1_SGMII :
 				MTK_ETH_PATH_GMAC2_SGMII;
 
 	/* Setup proper MUXes along the path */
-	err = mtk_eth_mux_setup(eth, path);
-	if (err)
-		return err;
-
-	return 0;
+	return mtk_eth_mux_setup(eth, path);
 }
 
 int mtk_gmac_gephy_path_setup(struct mtk_eth *eth, int mac_id)
-- 
2.22.0


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

* Re: [PATCH net-next] net: mediatek: simplify the return expression of mtk_gmac_sgmii_path_setup()
  2020-12-10 13:50 [PATCH net-next] net: mediatek: simplify the return expression of mtk_gmac_sgmii_path_setup() Zheng Yongjun
@ 2020-12-10 21:03 ` David Miller
  0 siblings, 0 replies; 2+ messages in thread
From: David Miller @ 2020-12-10 21:03 UTC (permalink / raw)
  To: zhengyongjun3
  Cc: kuba, mcoquelin.stm32, netdev, linux-kernel, nbd, john,
	sean.wang, Mark-MC.Lee

From: Zheng Yongjun <zhengyongjun3@huawei.com>
Date: Thu, 10 Dec 2020 21:50:50 +0800

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

Applied, thanks.

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

end of thread, other threads:[~2020-12-10 21:04 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-12-10 13:50 [PATCH net-next] net: mediatek: simplify the return expression of mtk_gmac_sgmii_path_setup() Zheng Yongjun
2020-12-10 21:03 ` David Miller

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.