summaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/sun/niu.c
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-27 06:17:54 +0200
commit42288830494cd51873ca745a7a229023df061226 (patch)
tree6a026da0990b1b60555b477e04aec6d0fa7cb634 /drivers/net/ethernet/sun/niu.c
parentMerge branch 'inet-frag-fixes' (diff)
downloadlinux-42288830494cd51873ca745a7a229023df061226.tar.xz
linux-42288830494cd51873ca745a7a229023df061226.zip
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/sun/niu.c')
-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