]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
net: dwc_eth_qos: Return error code when start fails
authorJonas Karlman <jonas@kwiboo.se>
Sun, 1 Oct 2023 19:17:17 +0000 (19:17 +0000)
committerKever Yang <kever.yang@rock-chips.com>
Sat, 7 Oct 2023 08:49:41 +0000 (16:49 +0800)
Return error code when phy_connect fails or no link can be established.

Signed-off-by: Jonas Karlman <jonas@kwiboo.se>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
Reviewed-by: Ramon Fried <rfried.dev@gmail.com>
drivers/net/dwc_eth_qos.c

index c733974793012227a98031daae739b78ee5dc362..27be5cf70b4d79d3fa70984624d5f42f0114ed43 100644 (file)
@@ -812,6 +812,7 @@ static int eqos_start(struct udevice *dev)
 
                if (!eqos->phy) {
                        pr_err("phy_connect() failed");
+                       ret = -ENODEV;
                        goto err_stop_resets;
                }
 
@@ -839,6 +840,7 @@ static int eqos_start(struct udevice *dev)
 
        if (!eqos->phy->link) {
                pr_err("No link");
+               ret = -EAGAIN;
                goto err_shutdown_phy;
        }