netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [Patch] BUG_ON cleanup in drivers/net/tokenring/
@ 2006-09-06 21:37 Eric Sesterhenn
  0 siblings, 0 replies; only message in thread
From: Eric Sesterhenn @ 2006-09-06 21:37 UTC (permalink / raw)
  To: kernel-janitors; +Cc: netdev

hi,

this patch converts one if() BUG(); to BUG_ON();
so it can be safely optimized away.

Signed-off-by: Eric Sesterhenn <snakebyte@gmx.de>

--- linux-2.6.18-rc6/drivers/net/tokenring/tmspci.c.orig	2006-09-06 23:32:41.000000000 +0200
+++ linux-2.6.18-rc6/drivers/net/tokenring/tmspci.c	2006-09-06 23:32:54.000000000 +0200
@@ -224,8 +224,7 @@ static void __devexit tms_pci_detach (st
 {
 	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);



^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2006-09-06 21:37 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-09-06 21:37 [Patch] BUG_ON cleanup in drivers/net/tokenring/ Eric Sesterhenn

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).