mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-10-03 23:58:05 +00:00
niu: don't count tx error twice in case of headroom realloc fails
Fixes: a3138df9
("[NIU]: Add Sun Neptune ethernet driver.")
Signed-off-by: Jiri Pirko <jiri@resnulli.us>
Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
64b892ad23
commit
4228883049
1 changed files with 1 additions and 3 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue