Commit a76b6b1f authored by Zheng Yongjun's avatar Zheng Yongjun Committed by David S. Miller

net: mediatek: simplify the return expression of mtk_gmac_sgmii_path_setup()

Simplify the return expression.
Signed-off-by: default avatarZheng Yongjun <zhengyongjun3@huawei.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent b18cac54
...@@ -241,17 +241,13 @@ static int mtk_eth_mux_setup(struct mtk_eth *eth, int path) ...@@ -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 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 : path = (mac_id == 0) ? MTK_ETH_PATH_GMAC1_SGMII :
MTK_ETH_PATH_GMAC2_SGMII; MTK_ETH_PATH_GMAC2_SGMII;
/* Setup proper MUXes along the path */ /* Setup proper MUXes along the path */
err = mtk_eth_mux_setup(eth, path); return mtk_eth_mux_setup(eth, path);
if (err)
return err;
return 0;
} }
int mtk_gmac_gephy_path_setup(struct mtk_eth *eth, int mac_id) int mtk_gmac_gephy_path_setup(struct mtk_eth *eth, int mac_id)
......
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