[PATCH 1/1] net: lwip: do not return CMD_RET_USAGE if no interface

Heinrich Schuchardt heinrich.schuchardt at canonical.com
Thu Dec 5 20:32:53 CET 2024


If the dns command cannot find a network interface, we should return
CMD_RETFAIURE and not -1 (CMD_RET_USAGE).

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt at canonical.com>
---
 net/lwip/dns.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/net/lwip/dns.c b/net/lwip/dns.c
index 4b937feaee1..1de63c9998b 100644
--- a/net/lwip/dns.c
+++ b/net/lwip/dns.c
@@ -56,7 +56,7 @@ static int dns_loop(struct udevice *udev, const char *name, const char *var)
 
 	netif = net_lwip_new_netif(udev);
 	if (!netif)
-		return -1;
+		return CMD_RET_FAILURE;
 
 	dns_init();
 
-- 
2.45.2



More information about the U-Boot mailing list