[U-Boot] [PATCH 1/1] net: macb: remove superfluous logical constraint

Heinrich Schuchardt xypron.glpk at gmx.de
Sun Mar 18 10:32:53 UTC 2018


In

	if (a > =0) {...}
	else (a < 0) {...}

the second logical constraint is superfluous.

Signed-off-by: Heinrich Schuchardt <xypron.glpk at gmx.de>
---
 drivers/net/macb.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/macb.c b/drivers/net/macb.c
index e62aefcd0d..fe370bf728 100644
--- a/drivers/net/macb.c
+++ b/drivers/net/macb.c
@@ -915,7 +915,7 @@ static int macb_recv(struct eth_device *netdev)
 		if (length >= 0) {
 			net_process_received_packet(packet, length);
 			reclaim_rx_buffers(macb, macb->next_rx_tail);
-		} else if (length < 0) {
+		} else {
 			return length;
 		}
 	}
-- 
2.16.2



More information about the U-Boot mailing list