Skip to content

Commit 4228883

Browse files
jpirkodavem330
authored andcommitted
niu: don't count tx error twice in case of headroom realloc fails
Fixes: a3138df ("[NIU]: Add Sun Neptune ethernet driver.") Signed-off-by: Jiri Pirko <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent 64b892a commit 4228883

File tree

1 file changed

+1
-3
lines changed
  • drivers/net/ethernet/sun

1 file changed

+1
-3
lines changed

drivers/net/ethernet/sun/niu.c

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6658,10 +6658,8 @@ static netdev_tx_t niu_start_xmit(struct sk_buff *skb,
66586658
struct sk_buff *skb_new;
66596659

66606660
skb_new = skb_realloc_headroom(skb, len);
6661-
if (!skb_new) {
6662-
rp->tx_errors++;
6661+
if (!skb_new)
66636662
goto out_drop;
6664-
}
66656663
kfree_skb(skb);
66666664
skb = skb_new;
66676665
} else

0 commit comments

Comments
 (0)