From: Jonas Karlman Date: Sun, 1 Oct 2023 19:17:17 +0000 (+0000) Subject: net: dwc_eth_qos: Return error code when start fails X-Git-Url: http://git.dujemihanovic.xyz/?a=commitdiff_plain;h=ded6014dfdcf8a9a73fc67eee72d40cdfff4e1fc;p=u-boot.git net: dwc_eth_qos: Return error code when start fails Return error code when phy_connect fails or no link can be established. Signed-off-by: Jonas Karlman Reviewed-by: Kever Yang Reviewed-by: Ramon Fried --- diff --git a/drivers/net/dwc_eth_qos.c b/drivers/net/dwc_eth_qos.c index c733974793..27be5cf70b 100644 --- a/drivers/net/dwc_eth_qos.c +++ b/drivers/net/dwc_eth_qos.c @@ -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; }