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>
This commit is contained in:

committed by
David S. Miller

parent
710b523ac5
commit
0ee904c35c
@@ -2207,8 +2207,7 @@ static void atl1_tx_map(struct atl1_adapter *adapter, struct sk_buff *skb,
|
||||
nr_frags = skb_shinfo(skb)->nr_frags;
|
||||
next_to_use = atomic_read(&tpd_ring->next_to_use);
|
||||
buffer_info = &tpd_ring->buffer_info[next_to_use];
|
||||
if (unlikely(buffer_info->skb))
|
||||
BUG();
|
||||
BUG_ON(buffer_info->skb);
|
||||
/* put skb in last TPD */
|
||||
buffer_info->skb = NULL;
|
||||
|
||||
@@ -2274,8 +2273,8 @@ static void atl1_tx_map(struct atl1_adapter *adapter, struct sk_buff *skb,
|
||||
ATL1_MAX_TX_BUF_LEN;
|
||||
for (i = 0; i < nseg; i++) {
|
||||
buffer_info = &tpd_ring->buffer_info[next_to_use];
|
||||
if (unlikely(buffer_info->skb))
|
||||
BUG();
|
||||
BUG_ON(buffer_info->skb);
|
||||
|
||||
buffer_info->skb = NULL;
|
||||
buffer_info->length = (buf_len > ATL1_MAX_TX_BUF_LEN) ?
|
||||
ATL1_MAX_TX_BUF_LEN : buf_len;
|
||||
|
Reference in New Issue
Block a user