[PATCH 31/32] net: ping: propagate failure

Ahmad Fatoum a.fatoum at pengutronix.de
Mon Sep 5 02:55:56 PDT 2022


We populate ret, but don't do anything with it. Pass it along instead.

Signed-off-by: Ahmad Fatoum <a.fatoum at pengutronix.de>
---
 net/net.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/net/net.c b/net/net.c
index eae45e184359..22931509d0d9 100644
--- a/net/net.c
+++ b/net/net.c
@@ -634,7 +634,7 @@ static int ping_reply(struct eth_device *edev, unsigned char *pkt, int len)
 
 	free(packet);
 
-	return 0;
+	return ret;
 }
 
 static int net_handle_icmp(struct eth_device *edev, unsigned char *pkt, int len)
-- 
2.30.2




More information about the barebox mailing list