Skip to content

Commit

Permalink
niu: don't count tx error twice in case of headroom realloc fails
Browse files Browse the repository at this point in the history
Fixes: a3138df ("[NIU]: Add Sun Neptune ethernet driver.")
Signed-off-by: Jiri Pirko <jiri@resnulli.us>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Jiri Pirko authored and David S. Miller committed Jul 27, 2015
1 parent 64b892a commit 4228883
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions drivers/net/ethernet/sun/niu.c
Original file line number Diff line number Diff line change
Expand Up @@ -6658,10 +6658,8 @@ static netdev_tx_t niu_start_xmit(struct sk_buff *skb,
struct sk_buff *skb_new;

skb_new = skb_realloc_headroom(skb, len);
if (!skb_new) {
rp->tx_errors++;
if (!skb_new)
goto out_drop;
}
kfree_skb(skb);
skb = skb_new;
} else
Expand Down

0 comments on commit 4228883

Please sign in to comment.