diff options
Diffstat (limited to 'drivers/net/tg3.c')
-rw-r--r-- | drivers/net/tg3.c | 15 |
1 files changed, 5 insertions, 10 deletions
diff --git a/drivers/net/tg3.c b/drivers/net/tg3.c index 770e6b6cec60..0b5358072172 100644 --- a/drivers/net/tg3.c +++ b/drivers/net/tg3.c | |||
@@ -2959,9 +2959,7 @@ static void tg3_tx(struct tg3 *tp) | |||
2959 | struct sk_buff *skb = ri->skb; | 2959 | struct sk_buff *skb = ri->skb; |
2960 | int i; | 2960 | int i; |
2961 | 2961 | ||
2962 | if (unlikely(skb == NULL)) | 2962 | BUG_ON(skb == NULL); |
2963 | BUG(); | ||
2964 | |||
2965 | pci_unmap_single(tp->pdev, | 2963 | pci_unmap_single(tp->pdev, |
2966 | pci_unmap_addr(ri, mapping), | 2964 | pci_unmap_addr(ri, mapping), |
2967 | skb_headlen(skb), | 2965 | skb_headlen(skb), |
@@ -2972,12 +2970,10 @@ static void tg3_tx(struct tg3 *tp) | |||
2972 | sw_idx = NEXT_TX(sw_idx); | 2970 | sw_idx = NEXT_TX(sw_idx); |
2973 | 2971 | ||
2974 | for (i = 0; i < skb_shinfo(skb)->nr_frags; i++) { | 2972 | for (i = 0; i < skb_shinfo(skb)->nr_frags; i++) { |
2975 | if (unlikely(sw_idx == hw_idx)) | 2973 | BUG_ON(sw_idx == hw_idx); |
2976 | BUG(); | ||
2977 | 2974 | ||
2978 | ri = &tp->tx_buffers[sw_idx]; | 2975 | ri = &tp->tx_buffers[sw_idx]; |
2979 | if (unlikely(ri->skb != NULL)) | 2976 | BUG_ON(ri->skb != NULL); |
2980 | BUG(); | ||
2981 | 2977 | ||
2982 | pci_unmap_page(tp->pdev, | 2978 | pci_unmap_page(tp->pdev, |
2983 | pci_unmap_addr(ri, mapping), | 2979 | pci_unmap_addr(ri, mapping), |
@@ -4928,9 +4924,8 @@ static int tg3_halt_cpu(struct tg3 *tp, u32 offset) | |||
4928 | { | 4924 | { |
4929 | int i; | 4925 | int i; |
4930 | 4926 | ||
4931 | if (offset == TX_CPU_BASE && | 4927 | BUG_ON(offset == TX_CPU_BASE && |
4932 | (tp->tg3_flags2 & TG3_FLG2_5705_PLUS)) | 4928 | (tp->tg3_flags2 & TG3_FLG2_5705_PLUS)); |
4933 | BUG(); | ||
4934 | 4929 | ||
4935 | if (offset == RX_CPU_BASE) { | 4930 | if (offset == RX_CPU_BASE) { |
4936 | for (i = 0; i < 10000; i++) { | 4931 | for (i = 0; i < 10000; i++) { |