mirror of
https://github.com/AsahiLinux/u-boot
synced 2024-11-28 15:41:40 +00:00
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:
parent
4ad1dfc7ab
commit
ded6014dfd
1 changed files with 2 additions and 0 deletions
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue