summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--net/net.c1
-rw-r--r--test/dm/eth.c2
2 files changed, 2 insertions, 1 deletions
diff --git a/net/net.c b/net/net.c
index a5a216c3ee..e9f7a7d85e 100644
--- a/net/net.c
+++ b/net/net.c
@@ -657,6 +657,7 @@ restart:
/* Invalidate the last protocol */
eth_set_last_protocol(BOOTP);
debug_cond(DEBUG_INT_STATE, "--- net_loop Fail!\n");
+ ret = -ENONET;
goto done;
case NETLOOP_CONTINUE:
diff --git a/test/dm/eth.c b/test/dm/eth.c
index 850eabb9dc..6e002b8dce 100644
--- a/test/dm/eth.c
+++ b/test/dm/eth.c
@@ -237,7 +237,7 @@ static int _dm_test_net_retry(struct unit_test_state *uts)
env_set("ethact", "eth@10004000");
env_set("netretry", "no");
sandbox_eth_skip_timeout();
- ut_asserteq(-ETIMEDOUT, net_loop(PING));
+ ut_asserteq(-ENONET, net_loop(PING));
ut_asserteq_str("eth@10004000", env_get("ethact"));
return 0;