diff options
author | Jiri Pirko <jiri@resnulli.us> | 2015-07-23 12:20:37 +0200 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2015-07-26 21:17:54 -0700 |
commit | 42288830494cd51873ca745a7a229023df061226 (patch) | |
tree | 6a026da0990b1b60555b477e04aec6d0fa7cb634 /drivers/net | |
parent | 64b892ad2326348a5b8314167590d240e3bcc69e (diff) |
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>
Diffstat (limited to 'drivers/net')
-rw-r--r-- | drivers/net/ethernet/sun/niu.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/net/ethernet/sun/niu.c b/drivers/net/ethernet/sun/niu.c index 0c5842aeb807..ab6051a43134 100644 --- a/drivers/net/ethernet/sun/niu.c +++ b/drivers/net/ethernet/sun/niu.c @@ -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 |