]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
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)
committerZefan Li <lizefan@huawei.com>
Mon, 21 Mar 2016 01:17:48 +0000 (09:17 +0800)
commit 42288830494cd51873ca745a7a229023df061226 upstream.

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>
Signed-off-by: Zefan Li <lizefan@huawei.com>
drivers/net/ethernet/sun/niu.c

index 8489d09494af3065f3ff036678e08e3ad2c3a9d8..e475f8530862b07f3a3e268f303eab0d24354a7b 100644 (file)
@@ -6659,10 +6659,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