mirror of
https://github.com/rd-stuffs/msm-4.14.git
synced 2025-02-20 11:45:48 +08:00
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>
This commit is contained in:
parent
09a3fc2bf1
commit
68cf162a1a
@ -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 (phydev && phydev->speed == SPEED_1000) {
|
||||||
if (++adapter->tx_ring.since_irq == PARM_TX_NUM_BUFS_DEF) {
|
if (++adapter->tx_ring.since_irq == PARM_TX_NUM_BUFS_DEF) {
|
||||||
/* Last element & Interrupt flag */
|
/* Last element & Interrupt flag */
|
||||||
|
Loading…
x
Reference in New Issue
Block a user