summaryrefslogtreecommitdiff
path: root/drivers/net/chelsio/sge.c
diff options
context:
space:
mode:
authorAlexander Beregalov <a.beregalov@gmail.com>2009-04-11 14:50:23 +0000
committerDavid S. Miller <davem@davemloft.net>2009-04-13 15:44:36 -0700
commit0ee904c35cc3fdd26a9c76077d9692d458309186 (patch)
treece1dee044974b7c6040bbdb794747cd1baa8f6bb /drivers/net/chelsio/sge.c
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/chelsio/sge.c')
-rw-r--r--drivers/net/chelsio/sge.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/net/chelsio/sge.c b/drivers/net/chelsio/sge.c
index 58f6fc055f6a..5e97a1a71d88 100644
--- a/drivers/net/chelsio/sge.c
+++ b/drivers/net/chelsio/sge.c
@@ -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);