diff options
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/net/tulip/de2104x.c | 18 |
1 files changed, 6 insertions, 12 deletions
diff --git a/drivers/net/tulip/de2104x.c b/drivers/net/tulip/de2104x.c index d7fb3ffe06ac..d6c3d52d2e86 100644 --- a/drivers/net/tulip/de2104x.c +++ b/drivers/net/tulip/de2104x.c | |||
@@ -402,8 +402,7 @@ static void de_rx (struct de_private *de) | |||
402 | unsigned copying_skb, buflen; | 402 | unsigned copying_skb, buflen; |
403 | 403 | ||
404 | skb = de->rx_skb[rx_tail].skb; | 404 | skb = de->rx_skb[rx_tail].skb; |
405 | if (!skb) | 405 | BUG_ON(!skb); |
406 | BUG(); | ||
407 | rmb(); | 406 | rmb(); |
408 | status = le32_to_cpu(de->rx_ring[rx_tail].opts1); | 407 | status = le32_to_cpu(de->rx_ring[rx_tail].opts1); |
409 | if (status & DescOwn) | 408 | if (status & DescOwn) |
@@ -545,8 +544,7 @@ static void de_tx (struct de_private *de) | |||
545 | break; | 544 | break; |
546 | 545 | ||
547 | skb = de->tx_skb[tx_tail].skb; | 546 | skb = de->tx_skb[tx_tail].skb; |
548 | if (!skb) | 547 | BUG_ON(!skb); |
549 | BUG(); | ||
550 | if (unlikely(skb == DE_DUMMY_SKB)) | 548 | if (unlikely(skb == DE_DUMMY_SKB)) |
551 | goto next; | 549 | goto next; |
552 | 550 | ||
@@ -789,8 +787,7 @@ static void __de_set_rx_mode (struct net_device *dev) | |||
789 | 787 | ||
790 | de->tx_head = NEXT_TX(entry); | 788 | de->tx_head = NEXT_TX(entry); |
791 | 789 | ||
792 | if (TX_BUFFS_AVAIL(de) < 0) | 790 | BUG_ON(TX_BUFFS_AVAIL(de) < 0); |
793 | BUG(); | ||
794 | if (TX_BUFFS_AVAIL(de) == 0) | 791 | if (TX_BUFFS_AVAIL(de) == 0) |
795 | netif_stop_queue(dev); | 792 | netif_stop_queue(dev); |
796 | 793 | ||
@@ -916,8 +913,7 @@ static void de_set_media (struct de_private *de) | |||
916 | unsigned media = de->media_type; | 913 | unsigned media = de->media_type; |
917 | u32 macmode = dr32(MacMode); | 914 | u32 macmode = dr32(MacMode); |
918 | 915 | ||
919 | if (de_is_running(de)) | 916 | BUG_ON(de_is_running(de)); |
920 | BUG(); | ||
921 | 917 | ||
922 | if (de->de21040) | 918 | if (de->de21040) |
923 | dw32(CSR11, FULL_DUPLEX_MAGIC); | 919 | dw32(CSR11, FULL_DUPLEX_MAGIC); |
@@ -1153,8 +1149,7 @@ static void de_media_interrupt (struct de_private *de, u32 status) | |||
1153 | return; | 1149 | return; |
1154 | } | 1150 | } |
1155 | 1151 | ||
1156 | if (!(status & LinkFail)) | 1152 | BUG_ON(!(status & LinkFail)); |
1157 | BUG(); | ||
1158 | 1153 | ||
1159 | if (netif_carrier_ok(de->dev)) { | 1154 | if (netif_carrier_ok(de->dev)) { |
1160 | de_link_down(de); | 1155 | de_link_down(de); |
@@ -2092,8 +2087,7 @@ static void __exit de_remove_one (struct pci_dev *pdev) | |||
2092 | struct net_device *dev = pci_get_drvdata(pdev); | 2087 | struct net_device *dev = pci_get_drvdata(pdev); |
2093 | struct de_private *de = dev->priv; | 2088 | struct de_private *de = dev->priv; |
2094 | 2089 | ||
2095 | if (!dev) | 2090 | BUG_ON(!dev); |
2096 | BUG(); | ||
2097 | unregister_netdev(dev); | 2091 | unregister_netdev(dev); |
2098 | kfree(de->ee_data); | 2092 | kfree(de->ee_data); |
2099 | iounmap(de->regs); | 2093 | iounmap(de->regs); |