Commit d57f6232 authored by Woojung.Huh@microchip.com's avatar Woojung.Huh@microchip.com Committed by David S. Miller

lan78xx: Remove BUG_ON()

Removing BUG_ON()
Signed-off-by: default avatarWoojung Huh <woojung.huh@microchip.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 81c38e81
......@@ -291,8 +291,6 @@ static int lan78xx_read_reg(struct lan78xx_net *dev, u32 index, u32 *data)
u32 *buf = kmalloc(sizeof(u32), GFP_KERNEL);
int ret;
BUG_ON(!dev);
if (!buf)
return -ENOMEM;
......@@ -319,8 +317,6 @@ static int lan78xx_write_reg(struct lan78xx_net *dev, u32 index, u32 data)
u32 *buf = kmalloc(sizeof(u32), GFP_KERNEL);
int ret;
BUG_ON(!dev);
if (!buf)
return -ENOMEM;
......@@ -351,10 +347,6 @@ static int lan78xx_read_stats(struct lan78xx_net *dev,
u32 *src;
u32 *dst;
BUG_ON(!dev);
BUG_ON(!data);
BUG_ON(sizeof(struct lan78xx_statstage) != 0xBC);
stats = kmalloc(sizeof(*stats), GFP_KERNEL);
if (!stats)
return -ENOMEM;
......@@ -687,9 +679,6 @@ static int lan78xx_read_raw_eeprom(struct lan78xx_net *dev, u32 offset,
u32 val;
int i, ret;
BUG_ON(!dev);
BUG_ON(!data);
ret = lan78xx_eeprom_confirm_not_busy(dev);
if (ret)
return ret;
......@@ -737,9 +726,6 @@ static int lan78xx_write_raw_eeprom(struct lan78xx_net *dev, u32 offset,
u32 val;
int i, ret;
BUG_ON(!dev);
BUG_ON(!data);
ret = lan78xx_eeprom_confirm_not_busy(dev);
if (ret)
return ret;
......@@ -2220,20 +2206,10 @@ static enum skb_state defer_bh(struct lan78xx_net *dev, struct sk_buff *skb,
spin_lock_irqsave(&list->lock, flags);
old_state = entry->state;
entry->state = state;
if (!list->prev)
BUG_ON(!list->prev);
if (!list->next)
BUG_ON(!list->next);
if (!skb->prev || !skb->next)
BUG_ON(true);
__skb_unlink(skb, list);
spin_unlock(&list->lock);
spin_lock(&dev->done.lock);
if (!dev->done.prev)
BUG_ON(!dev->done.prev);
if (!dev->done.next)
BUG_ON(!dev->done.next);
__skb_queue_tail(&dev->done, skb);
if (skb_queue_len(&dev->done) == 1)
......@@ -2749,8 +2725,6 @@ static void lan78xx_tx_bh(struct lan78xx_net *dev)
memcpy(skb->data + pos, skb2->data, skb2->len);
pos += roundup(skb2->len, sizeof(u32));
dev_kfree_skb(skb2);
} else {
BUG_ON(true);
}
}
......@@ -2859,11 +2833,6 @@ static void lan78xx_bh(unsigned long param)
struct sk_buff *skb;
struct skb_data *entry;
if (!dev->done.prev)
BUG_ON(!dev->done.prev);
if (!dev->done.next)
BUG_ON(!dev->done.next);
while ((skb = skb_dequeue(&dev->done))) {
entry = (struct skb_data *)(skb->cb);
switch (entry->state) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment