aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/atlx
diff options
context:
space:
mode:
authorAlexander Beregalov <a.beregalov@gmail.com>2009-04-11 10:50:23 -0400
committerDavid S. Miller <davem@davemloft.net>2009-04-13 18:44:36 -0400
commit0ee904c35cc3fdd26a9c76077d9692d458309186 (patch)
treece1dee044974b7c6040bbdb794747cd1baa8f6bb /drivers/net/atlx
parent710b523ac59426e8bfdea3533f42118e46b9cbfb (diff)
drivers/net: replace BUG() with BUG_ON() if possible
Signed-off-by: Alexander Beregalov <a.beregalov@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/atlx')
-rw-r--r--drivers/net/atlx/atl1.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/drivers/net/atlx/atl1.c b/drivers/net/atlx/atl1.c
index 0ab22540bf59..13f0bdc32449 100644
--- a/drivers/net/atlx/atl1.c
+++ b/drivers/net/atlx/atl1.c
@@ -2207,8 +2207,7 @@ static void atl1_tx_map(struct atl1_adapter *adapter, struct sk_buff *skb,
2207 nr_frags = skb_shinfo(skb)->nr_frags; 2207 nr_frags = skb_shinfo(skb)->nr_frags;
2208 next_to_use = atomic_read(&tpd_ring->next_to_use); 2208 next_to_use = atomic_read(&tpd_ring->next_to_use);
2209 buffer_info = &tpd_ring->buffer_info[next_to_use]; 2209 buffer_info = &tpd_ring->buffer_info[next_to_use];
2210 if (unlikely(buffer_info->skb)) 2210 BUG_ON(buffer_info->skb);
2211 BUG();
2212 /* put skb in last TPD */ 2211 /* put skb in last TPD */
2213 buffer_info->skb = NULL; 2212 buffer_info->skb = NULL;
2214 2213
@@ -2274,8 +2273,8 @@ static void atl1_tx_map(struct atl1_adapter *adapter, struct sk_buff *skb,
2274 ATL1_MAX_TX_BUF_LEN; 2273 ATL1_MAX_TX_BUF_LEN;
2275 for (i = 0; i < nseg; i++) { 2274 for (i = 0; i < nseg; i++) {
2276 buffer_info = &tpd_ring->buffer_info[next_to_use]; 2275 buffer_info = &tpd_ring->buffer_info[next_to_use];
2277 if (unlikely(buffer_info->skb)) 2276 BUG_ON(buffer_info->skb);
2278 BUG(); 2277
2279 buffer_info->skb = NULL; 2278 buffer_info->skb = NULL;
2280 buffer_info->length = (buf_len > ATL1_MAX_TX_BUF_LEN) ? 2279 buffer_info->length = (buf_len > ATL1_MAX_TX_BUF_LEN) ?
2281 ATL1_MAX_TX_BUF_LEN : buf_len; 2280 ATL1_MAX_TX_BUF_LEN : buf_len;