Subject: [patch 06/13] Fix a potential NULL pointer dereference in uli526x_interrupt() in drivers/net/tulip/uli526x.c

From: [email-masked]
Date: Tue, 02 Oct 2007 14:11:38 -0700

From: Micah Gruber <[email-masked]>

This patch fixes an apparent potential null dereference bug where we
dereference dev before a null check.  This patch simply remvoes the
can't-happen test for a null pointer.

Signed-off-by: Micah Gruber <[email-masked]>
Cc: Grant Grundler <[email-masked]>
Acked-by: Jeff Garzik <[email-masked]>
Acked-by: Kyle McMartin <[email-masked]>
Signed-off-by: Andrew Morton <[email-masked]>
---

 drivers/net/tulip/uli526x.c |    5 -----
 1 file changed, 5 deletions(-)

diff -puN drivers/net/tulip/uli526x.c~fix-a-potential-null-pointer-dereference-in-uli526x_interrupt drivers/net/tulip/uli526x.c
--- a/drivers/net/tulip/uli526x.c~fix-a-potential-null-pointer-dereference-in-uli526x_interrupt
+++ a/drivers/net/tulip/uli526x.c
@@ -664,11 +664,6 @@ static irqreturn_t uli526x_interrupt(int
 	unsigned long ioaddr = dev->base_addr;
 	unsigned long flags;
 
-	if (!dev) {
-		ULI526X_DBUG(1, "uli526x_interrupt() without DEVICE arg", 0);
-		return IRQ_NONE;
-	}
-
 	spin_lock_irqsave(&db->lock, flags);
 	outl(0, ioaddr + DCR7);
 
_