From ded6014dfdcf8a9a73fc67eee72d40cdfff4e1fc Mon Sep 17 00:00:00 2001 From: Jonas Karlman Date: Sun, 1 Oct 2023 19:17:17 +0000 Subject: [PATCH] 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 --- drivers/net/dwc_eth_qos.c | 2 ++ 1 file changed, 2 insertions(+) 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; } -- 2.39.5