diff options
author | Roel Kluin <roel.kluin@gmail.com> | 2010-01-19 15:21:45 +0100 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2010-01-21 01:21:22 +0100 |
commit | c1fa347f20f17f14a4a1575727fa24340e8a9117 (patch) | |
tree | 520a4cc063e0f64030ddae6744970c7fcb0785db /drivers/net/ixgb | |
parent | netlink: With opcode INET_DIAG_BC_S_LE dport was compared in inet_diag_bc_run() (diff) | |
download | linux-c1fa347f20f17f14a4a1575727fa24340e8a9117.tar.xz linux-c1fa347f20f17f14a4a1575727fa24340e8a9117.zip |
e1000/e1000e/igb/igbvf/ixgb/ixgbe: Fix tests of unsigned in *_tx_map()
The variable count and i are unsigned so the (<|>=)0 tests do not work.
Signed-off-by: Roel Kluin <roel.kluin@gmail.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ixgb')
-rw-r--r-- | drivers/net/ixgb/ixgb_main.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/drivers/net/ixgb/ixgb_main.c b/drivers/net/ixgb/ixgb_main.c index bcd0f01d5feb..593d1a4f217c 100644 --- a/drivers/net/ixgb/ixgb_main.c +++ b/drivers/net/ixgb/ixgb_main.c @@ -1363,13 +1363,13 @@ ixgb_tx_map(struct ixgb_adapter *adapter, struct sk_buff *skb, dma_error: dev_err(&pdev->dev, "TX DMA map failed\n"); buffer_info->dma = 0; - count--; - - while (count >= 0) { + if (count) count--; - i--; - if (i < 0) + + while (count--) { + if (i==0) i += tx_ring->count; + i--; buffer_info = &tx_ring->buffer_info[i]; ixgb_unmap_and_free_tx_resource(adapter, buffer_info); } |