diff options
-rwxr-xr-x | drivers/net/qla3xxx.c | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/drivers/net/qla3xxx.c b/drivers/net/qla3xxx.c index 5d358d3779de..9952e3931e34 100755 --- a/drivers/net/qla3xxx.c +++ b/drivers/net/qla3xxx.c | |||
@@ -2217,12 +2217,7 @@ static int ql_send_map(struct ql3_adapter *qdev, | |||
2217 | int seg_cnt, seg = 0; | 2217 | int seg_cnt, seg = 0; |
2218 | int frag_cnt = (int)skb_shinfo(skb)->nr_frags; | 2218 | int frag_cnt = (int)skb_shinfo(skb)->nr_frags; |
2219 | 2219 | ||
2220 | seg_cnt = tx_cb->seg_count = ql_get_seg_count(qdev, | 2220 | seg_cnt = tx_cb->seg_count; |
2221 | (skb_shinfo(skb)->nr_frags)); | ||
2222 | if(seg_cnt == -1) { | ||
2223 | printk(KERN_ERR PFX"%s: invalid segment count!\n",__func__); | ||
2224 | return NETDEV_TX_BUSY; | ||
2225 | } | ||
2226 | /* | 2221 | /* |
2227 | * Map the skb buffer first. | 2222 | * Map the skb buffer first. |
2228 | */ | 2223 | */ |
@@ -2278,7 +2273,7 @@ static int ql_send_map(struct ql3_adapter *qdev, | |||
2278 | pci_unmap_addr_set(&tx_cb->map[seg], mapaddr, | 2273 | pci_unmap_addr_set(&tx_cb->map[seg], mapaddr, |
2279 | map); | 2274 | map); |
2280 | pci_unmap_len_set(&tx_cb->map[seg], maplen, | 2275 | pci_unmap_len_set(&tx_cb->map[seg], maplen, |
2281 | len); | 2276 | sizeof(struct oal)); |
2282 | oal_entry = (struct oal_entry *)oal; | 2277 | oal_entry = (struct oal_entry *)oal; |
2283 | oal++; | 2278 | oal++; |
2284 | seg++; | 2279 | seg++; |