diff options
author | Woojung.Huh@microchip.com <Woojung.Huh@microchip.com> | 2015-08-11 15:23:33 +0000 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2015-08-12 14:44:16 -0700 |
commit | d57f6232c157f03db7cb1ae62a3dcc548014a530 (patch) | |
tree | f43cd01e49bab4ea56215cc2fe5921d3804c0ec4 /drivers/net/usb | |
parent | 81c38e811af6107b9941c6716e82c6fd93308541 (diff) |
lan78xx: Remove BUG_ON()
Removing BUG_ON()
Signed-off-by: Woojung Huh <woojung.huh@microchip.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/usb')
-rw-r--r-- | drivers/net/usb/lan78xx.c | 31 |
1 files changed, 0 insertions, 31 deletions
diff --git a/drivers/net/usb/lan78xx.c b/drivers/net/usb/lan78xx.c index 3a6a4c1283d6..39364a45af40 100644 --- a/drivers/net/usb/lan78xx.c +++ b/drivers/net/usb/lan78xx.c @@ -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) { |