mirror of
https://github.com/u-boot/u-boot.git
synced 2025-04-16 18:04:48 +00:00
net: lwip: do_ping() should return CMD_RET_FAILURE when no device
do_ping() expects ping_loop() to return a negative value on error, so that it can propagate it to the caller as CMD_RET_FAILURE. This is not the case when no ethernet device is found, so fix that. Signed-off-by: Jerome Forissier <jerome.forissier@linaro.org> Reviewed-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
This commit is contained in:
parent
6d66a72a0a
commit
42df30a210
1 changed files with 1 additions and 1 deletions
|
@ -121,7 +121,7 @@ static int ping_loop(struct udevice *udev, const ip_addr_t *addr)
|
|||
|
||||
netif = net_lwip_new_netif(udev);
|
||||
if (!netif)
|
||||
return CMD_RET_FAILURE;
|
||||
return -ENODEV;
|
||||
|
||||
printf("Using %s device\n", udev->name);
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue