]> git.proxmox.com Git - mirror_ubuntu-hirsute-kernel.git/commitdiff
net: mediatek: simplify the return expression of mtk_gmac_sgmii_path_setup()
authorZheng Yongjun <zhengyongjun3@huawei.com>
Thu, 10 Dec 2020 13:50:50 +0000 (21:50 +0800)
committerDavid S. Miller <davem@davemloft.net>
Thu, 10 Dec 2020 21:02:16 +0000 (13:02 -0800)
Simplify the return expression.

Signed-off-by: Zheng Yongjun <zhengyongjun3@huawei.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/mediatek/mtk_eth_path.c

index 0fe97155dd8f12515c836f1c1a460ce8a6330278..6bc9f24873840c142875368ef83264d2b6eb11cd 100644 (file)
@@ -241,17 +241,13 @@ out:
 
 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)