]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
net: enetc: propagate the return code from phy_startup() to eth_ops::start
authorVladimir Oltean <vladimir.oltean@nxp.com>
Tue, 29 Jun 2021 17:53:17 +0000 (20:53 +0300)
committerRamon Fried <rfried.dev@gmail.com>
Tue, 6 Jul 2021 02:22:41 +0000 (05:22 +0300)
Make sure that errors in the PHY driver .startup() method, such as no
link, are propagated and not ignored.

Signed-off-by: Vladimir Oltean <vladimir.oltean@nxp.com>
Reviewed-by: Ramon Fried <rfried.dev@gmail.com>
drivers/net/fsl_enetc.c

index 6a5a38c1ffe2d74c44cba9713e8b4bdaa045abdb..566cdc7e546a6728ca64d14c42a39ecaa80f7401 100644 (file)
@@ -568,11 +568,9 @@ static int enetc_start(struct udevice *dev)
        enetc_setup_tx_bdr(dev);
        enetc_setup_rx_bdr(dev);
 
-       phy_startup(priv->phy);
-
        enetc_setup_mac_iface(dev, priv->phy);
 
-       return 0;
+       return phy_startup(priv->phy);
 }
 
 /*