niu: don't count tx error twice in case of headroom realloc fails
authorJiri Pirko <jiri@resnulli.us>
Thu, 23 Jul 2015 10:20:37 +0000 (12:20 +0200)
committerDavid S. Miller <davem@davemloft.net>
Mon, 27 Jul 2015 04:17:54 +0000 (21:17 -0700)
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>
drivers/net/ethernet/sun/niu.c

index 0c5842aeb807014c632a2d713b366133d7021f56..ab6051a43134f4dd7296679ffe089203162e3aa7 100644 (file)
@@ -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