summaryrefslogtreecommitdiff
path: root/drivers/net/ethernet
diff options
context:
space:
mode:
authorJiri Pirko <jiri@resnulli.us>2015-07-23 12:20:37 +0200
committerDavid S. Miller <davem@davemloft.net>2015-07-26 21:17:54 -0700
commit42288830494cd51873ca745a7a229023df061226 (patch)
tree6a026da0990b1b60555b477e04aec6d0fa7cb634 /drivers/net/ethernet
parent64b892ad2326348a5b8314167590d240e3bcc69e (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/ethernet')
-rw-r--r--drivers/net/ethernet/sun/niu.c4
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