aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/igb
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/igb')
-rw-r--r--drivers/net/igb/igb_main.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/drivers/net/igb/igb_main.c b/drivers/net/igb/igb_main.c
index ab7c5e97ed0..f588e49c65f 100644
--- a/drivers/net/igb/igb_main.c
+++ b/drivers/net/igb/igb_main.c
@@ -3647,14 +3647,12 @@ dma_error:
3647 buffer_info->length = 0; 3647 buffer_info->length = 0;
3648 buffer_info->next_to_watch = 0; 3648 buffer_info->next_to_watch = 0;
3649 buffer_info->mapped_as_page = false; 3649 buffer_info->mapped_as_page = false;
3650 count--;
3651 3650
3652 /* clear timestamp and dma mappings for remaining portion of packet */ 3651 /* clear timestamp and dma mappings for remaining portion of packet */
3653 while (count >= 0) { 3652 while (count--) {
3654 count--; 3653 if (i == 0)
3654 i = tx_ring->count;
3655 i--; 3655 i--;
3656 if (i < 0)
3657 i += tx_ring->count;
3658 buffer_info = &tx_ring->buffer_info[i]; 3656 buffer_info = &tx_ring->buffer_info[i];
3659 igb_unmap_and_free_tx_resource(tx_ring, buffer_info); 3657 igb_unmap_and_free_tx_resource(tx_ring, buffer_info);
3660 } 3658 }