]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
net: lwip: do not return CMD_RET_USAGE if no interface
authorHeinrich Schuchardt <heinrich.schuchardt@canonical.com>
Thu, 5 Dec 2024 19:32:53 +0000 (20:32 +0100)
committerTom Rini <trini@konsulko.com>
Thu, 19 Dec 2024 18:17:32 +0000 (12:17 -0600)
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@canonical.com>
Reviewed-by: Jerome Forissier <jerome.forissier@linaro.org>
net/lwip/dns.c

index 4b937feaee1e1e5ae3313f69bc970a27a342a523..1de63c9998b086797de83008cd52e6610776ee2f 100644 (file)
@@ -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();