Commit 50f46c97 authored by Jiri Pirko's avatar Jiri Pirko Committed by Zefan Li

niu: don't count tx error twice in case of headroom realloc fails

commit 42288830 upstream.

Fixes: a3138df9 ("[NIU]: Add Sun Neptune ethernet driver.")
Signed-off-by: default avatarJiri Pirko <jiri@resnulli.us>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
Signed-off-by: default avatarZefan Li <lizefan@huawei.com>
parent cdaad7c1
...@@ -6659,10 +6659,8 @@ static netdev_tx_t niu_start_xmit(struct sk_buff *skb, ...@@ -6659,10 +6659,8 @@ static netdev_tx_t niu_start_xmit(struct sk_buff *skb,
struct sk_buff *skb_new; struct sk_buff *skb_new;
skb_new = skb_realloc_headroom(skb, len); skb_new = skb_realloc_headroom(skb, len);
if (!skb_new) { if (!skb_new)
rp->tx_errors++;
goto out_drop; goto out_drop;
}
kfree_skb(skb); kfree_skb(skb);
skb = skb_new; skb = skb_new;
} else } else
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment