From: Mark Einon <mark.einon@gmail.com>
Date: Sun, 23 Oct 2011 09:22:54 +0000 (+0100)
Subject: staging: et131x: Remove redundant check and return statement
X-Git-Tag: firefly_0821_release~3680^2~4313^2^2
X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=68cf162a1af23c35db8e3b78659c99196c9882ff;p=firefly-linux-kernel-4.4.55.git

staging: et131x: Remove redundant check and return statement

In nic_send_packet(), by the time 'frag' is checked to be zero, it never
is - the for loop has been entered (as nr_frags is always > 0) and frag
has been incremented at least once. Remove the check and associated
error return.

Signed-off-by: Mark Einon <mark.einon@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---

diff --git a/drivers/staging/et131x/et131x.c b/drivers/staging/et131x/et131x.c
index 98c6974da889..45b88d4b0930 100644
--- a/drivers/staging/et131x/et131x.c
+++ b/drivers/staging/et131x/et131x.c
@@ -3412,9 +3412,6 @@ static int nic_send_packet(struct et131x_adapter *adapter, struct tcb *tcb)
 		}
 	}
 
-	if (frag == 0)
-		return -EIO;
-
 	if (phydev && phydev->speed == SPEED_1000) {
 		if (++adapter->tx_ring.since_irq == PARM_TX_NUM_BUFS_DEF) {
 			/* Last element & Interrupt flag */