diff options
author | Torsten Kaiser <just.for.lkml@googlemail.com> | 2012-04-09 01:14:15 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2012-04-13 11:01:44 -0400 |
commit | 31304165ffb888483e0f7c805876f25f493a3049 (patch) | |
tree | fc3d9973f4887f47adf414df483fa466056352e7 /drivers/net | |
parent | 89eb06f11c314c2ab4ec59039715dc021933a7a0 (diff) |
net: Fix misplaced parenthesis in virtio_net.c
Commit 2e57b79ccef1ff1422fdf45a9b28fe60f8f084f7 misplaced its
parenthesis and now tx_fifo_errors will only be incremented if an
ENOMEM error is not written to the syslog.
Correct the parenthesis and indentation to the original goal of
counting all non ENOMEM errors and ratelimiting only the messages.
Signed-of-by: Torsten Kaiser <just.for.lkml@googlemail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net')
-rw-r--r-- | drivers/net/virtio_net.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/drivers/net/virtio_net.c b/drivers/net/virtio_net.c index 4de2760c5937..af8acc85f4bb 100644 --- a/drivers/net/virtio_net.c +++ b/drivers/net/virtio_net.c | |||
@@ -626,16 +626,15 @@ static netdev_tx_t start_xmit(struct sk_buff *skb, struct net_device *dev) | |||
626 | /* This can happen with OOM and indirect buffers. */ | 626 | /* This can happen with OOM and indirect buffers. */ |
627 | if (unlikely(capacity < 0)) { | 627 | if (unlikely(capacity < 0)) { |
628 | if (likely(capacity == -ENOMEM)) { | 628 | if (likely(capacity == -ENOMEM)) { |
629 | if (net_ratelimit()) { | 629 | if (net_ratelimit()) |
630 | dev_warn(&dev->dev, | 630 | dev_warn(&dev->dev, |
631 | "TX queue failure: out of memory\n"); | 631 | "TX queue failure: out of memory\n"); |
632 | } else { | 632 | } else { |
633 | dev->stats.tx_fifo_errors++; | 633 | dev->stats.tx_fifo_errors++; |
634 | if (net_ratelimit()) | 634 | if (net_ratelimit()) |
635 | dev_warn(&dev->dev, | 635 | dev_warn(&dev->dev, |
636 | "Unexpected TX queue failure: %d\n", | 636 | "Unexpected TX queue failure: %d\n", |
637 | capacity); | 637 | capacity); |
638 | } | ||
639 | } | 638 | } |
640 | dev->stats.tx_dropped++; | 639 | dev->stats.tx_dropped++; |
641 | kfree_skb(skb); | 640 | kfree_skb(skb); |