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 <jonas@kwiboo.se>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
Reviewed-by: Ramon Fried <rfried.dev@gmail.com>
This commit is contained in:
Jonas Karlman 2023-10-01 19:17:17 +00:00 committed by Kever Yang
parent 4ad1dfc7ab
commit ded6014dfd

View 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;
}