Fix a potential NULL pointer dereference in uli526x_interrupt() in drivers/net/tulip...
authorMicah Gruber <micah.gruber@gmail.com>
Sat, 29 Sep 2007 05:42:11 +0000 (22:42 -0700)
committerDavid S. Miller <davem@sunset.davemloft.net>
Wed, 10 Oct 2007 23:53:53 +0000 (16:53 -0700)
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 <micah.gruber@gmail.com>
Cc: Grant Grundler <grundler@parisc-linux.org>
Acked-by: Jeff Garzik <jeff@garzik.org>
Acked-by: Kyle McMartin <kyle@mcmartin.ca>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
drivers/net/tulip/uli526x.c

index e64bde4..76e5561 100644 (file)
@@ -664,11 +664,6 @@ static irqreturn_t uli526x_interrupt(int irq, void *dev_id)
        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);