diff options
author | Jiri Pirko <jiri@resnulli.us> | 2015-07-23 12:20:37 +0200 |
---|---|---|
committer | Ben Hutchings <ben@decadent.org.uk> | 2015-08-12 16:33:23 +0200 |
commit | a2edd216acb433c6c0ed03d3f5b7f6f5fa2f063a (patch) | |
tree | 2a06fa3864feb9c248de68a5f33c3571c639247b | |
parent | ba2bab3a5a790c67fc8afef5cee61dd7348615aa (diff) | |
download | lwn-a2edd216acb433c6c0ed03d3f5b7f6f5fa2f063a.tar.gz lwn-a2edd216acb433c6c0ed03d3f5b7f6f5fa2f063a.zip |
niu: don't count tx error twice in case of headroom realloc fails
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: Ben Hutchings <ben@decadent.org.uk>
-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 73c708107a37..c646a49cc803 100644 --- a/drivers/net/ethernet/sun/niu.c +++ b/drivers/net/ethernet/sun/niu.c @@ -6670,10 +6670,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 |