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>
This commit is contained in:
parent
b4ced2b768
commit
c1fa347f20
5 changed files with 25 additions and 25 deletions
|
@ -3962,13 +3962,13 @@ static int e1000_tx_map(struct e1000_adapter *adapter,
|
|||
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];
|
||||
e1000_put_txbuf(adapter, buffer_info);;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue