Skip to content

Commit

Permalink
BUG_ON cleanup in drivers/net/tokenring/
Browse files Browse the repository at this point in the history
This patch converts one if() BUG(); to BUG_ON();
so it can be safely optimized away.

Signed-off-by: Eric Sesterhenn <snakebyte@gmx.de>
Signed-off-by: Adrian Bunk <bunk@stusta.de>
  • Loading branch information
Eric Sesterhenn authored and Adrian Bunk committed Oct 3, 2006
1 parent 52e5f9d commit 644c12d
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions drivers/net/tokenring/tmspci.c
Original file line number Diff line number Diff line change
Expand Up @@ -224,8 +224,7 @@ static void __devexit tms_pci_detach (struct pci_dev *pdev)
{
struct net_device *dev = pci_get_drvdata(pdev);

if (!dev)
BUG();
BUG_ON(!dev);
unregister_netdev(dev);
release_region(dev->base_addr, TMS_PCI_IO_EXTENT);
free_irq(dev->irq, dev);
Expand Down

0 comments on commit 644c12d

Please sign in to comment.