From: Maxim Uvarov Date: Tue, 26 Dec 2023 15:46:13 +0000 (+0600) Subject: net/smc911x: fix return from smc911x_send X-Git-Url: http://git.dujemihanovic.xyz/?a=commitdiff_plain;h=f5ead4c5fb14eedc788fc594af3b34a1fc7fb37e;p=u-boot.git net/smc911x: fix return from smc911x_send return value of smc911x_send is ignored, but on sucesseful send we need return 0 and or error -ETIMEOUT, not opposite. Signed-off-by: Maxim Uvarov Reviewed-by: Tom Rini Reviewed-by: Simon Glass --- diff --git a/drivers/net/smc911x.c b/drivers/net/smc911x.c index 5c5ad8b84a..616b7ce174 100644 --- a/drivers/net/smc911x.c +++ b/drivers/net/smc911x.c @@ -403,7 +403,7 @@ static int smc911x_send(struct udevice *dev, void *packet, int length) ret = smc911x_send_common(priv, packet, length); - return ret ? 0 : -ETIMEDOUT; + return ret ? -ETIMEDOUT : 0; } static int smc911x_recv(struct udevice *dev, int flags, uchar **packetp)