aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/e1000
diff options
context:
space:
mode:
authorRoel Kluin <roel.kluin@gmail.com>2010-01-19 09:21:45 -0500
committerDavid S. Miller <davem@davemloft.net>2010-01-20 19:21:22 -0500
commitc1fa347f20f17f14a4a1575727fa24340e8a9117 (patch)
tree520a4cc063e0f64030ddae6744970c7fcb0785db /drivers/net/e1000
parentb4ced2b768ab6c580148d1163c82a655fe147edc (diff)
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/e1000')
-rw-r--r--drivers/net/e1000/e1000_main.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/drivers/net/e1000/e1000_main.c b/drivers/net/e1000/e1000_main.c
index 7e855f9bbd97..b3f67b41627f 100644
--- a/drivers/net/e1000/e1000_main.c
+++ b/drivers/net/e1000/e1000_main.c
@@ -2802,13 +2802,13 @@ static int e1000_tx_map(struct e1000_adapter *adapter,
2802dma_error: 2802dma_error:
2803 dev_err(&pdev->dev, "TX DMA map failed\n"); 2803 dev_err(&pdev->dev, "TX DMA map failed\n");
2804 buffer_info->dma = 0; 2804 buffer_info->dma = 0;
2805 count--; 2805 if (count)
2806
2807 while (count >= 0) {
2808 count--; 2806 count--;
2809 i--; 2807
2810 if (i < 0) 2808 while (count--) {
2809 if (i==0)
2811 i += tx_ring->count; 2810 i += tx_ring->count;
2811 i--;
2812 buffer_info = &tx_ring->buffer_info[i]; 2812 buffer_info = &tx_ring->buffer_info[i];
2813 e1000_unmap_and_free_tx_resource(adapter, buffer_info); 2813 e1000_unmap_and_free_tx_resource(adapter, buffer_info);
2814 } 2814 }