diff options
author | Greg Rose <gregory.v.rose@intel.com> | 2010-03-24 05:35:42 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2010-03-26 14:56:00 -0400 |
commit | 65deeed7b34bc5b8d3cbff495e8fa2ae7b563480 (patch) | |
tree | dececb1885019a371596895665765f2a7b15facd /drivers/net | |
parent | 48c11a59c4c1d9926be34920d45da037516eb7b8 (diff) |
ixgbevf: Fix signed/unsigned int error
In the Tx mapping function if a DMA error occurred then the unwind of
previously mapped sections would improperly check an unsigned int if
it was less than zero. Changed the index variable to signed to avoid
the error.
Signed-off-by: Greg Rose <gregory.v.rose@intel.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')
-rw-r--r-- | drivers/net/ixgbevf/ixgbevf_main.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/net/ixgbevf/ixgbevf_main.c b/drivers/net/ixgbevf/ixgbevf_main.c index d6cbd943a6f0..1bbbef3ee3f4 100644 --- a/drivers/net/ixgbevf/ixgbevf_main.c +++ b/drivers/net/ixgbevf/ixgbevf_main.c | |||
@@ -2943,9 +2943,10 @@ static int ixgbevf_tx_map(struct ixgbevf_adapter *adapter, | |||
2943 | struct ixgbevf_tx_buffer *tx_buffer_info; | 2943 | struct ixgbevf_tx_buffer *tx_buffer_info; |
2944 | unsigned int len; | 2944 | unsigned int len; |
2945 | unsigned int total = skb->len; | 2945 | unsigned int total = skb->len; |
2946 | unsigned int offset = 0, size, count = 0, i; | 2946 | unsigned int offset = 0, size, count = 0; |
2947 | unsigned int nr_frags = skb_shinfo(skb)->nr_frags; | 2947 | unsigned int nr_frags = skb_shinfo(skb)->nr_frags; |
2948 | unsigned int f; | 2948 | unsigned int f; |
2949 | int i; | ||
2949 | 2950 | ||
2950 | i = tx_ring->next_to_use; | 2951 | i = tx_ring->next_to_use; |
2951 | 2952 | ||