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
@@ -1149,8 +1149,8 @@ static inline void write_tx_desc(struct cmdQ_e *e, dma_addr_t mapping,
|
||||
unsigned int len, unsigned int gen,
|
||||
unsigned int eop)
|
||||
{
|
||||
if (unlikely(len > SGE_TX_DESC_MAX_PLEN))
|
||||
BUG();
|
||||
BUG_ON(len > SGE_TX_DESC_MAX_PLEN);
|
||||
|
||||
e->addr_lo = (u32)mapping;
|
||||
e->addr_hi = (u64)mapping >> 32;
|
||||
e->len_gen = V_CMD_LEN(len) | V_CMD_GEN1(gen);
|
||||
|
Reference in New Issue
Block a user