mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-11-16 08:44:21 +08:00
net: Fix misplaced parenthesis in virtio_net.c
Commit 2e57b79cce
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>
This commit is contained in:
parent
89eb06f11c
commit
31304165ff
@ -626,7 +626,7 @@ static netdev_tx_t start_xmit(struct sk_buff *skb, struct net_device *dev)
|
||||
/* This can happen with OOM and indirect buffers. */
|
||||
if (unlikely(capacity < 0)) {
|
||||
if (likely(capacity == -ENOMEM)) {
|
||||
if (net_ratelimit()) {
|
||||
if (net_ratelimit())
|
||||
dev_warn(&dev->dev,
|
||||
"TX queue failure: out of memory\n");
|
||||
} else {
|
||||
@ -636,7 +636,6 @@ static netdev_tx_t start_xmit(struct sk_buff *skb, struct net_device *dev)
|
||||
"Unexpected TX queue failure: %d\n",
|
||||
capacity);
|
||||
}
|
||||
}
|
||||
dev->stats.tx_dropped++;
|
||||
kfree_skb(skb);
|
||||
return NETDEV_TX_OK;
|
||||
|
Loading…
Reference in New Issue
Block a user