Skip to content

Commit

Permalink
staging: et131x: Remove redundant check and return statement
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Mark Einon authored and Greg Kroah-Hartman committed Oct 23, 2011
1 parent 09a3fc2 commit 68cf162
Showing 1 changed file with 0 additions and 3 deletions.
3 changes: 0 additions & 3 deletions drivers/staging/et131x/et131x.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 */
Expand Down

0 comments on commit 68cf162

Please sign in to comment.