From: Micah Gruber Date: Sat, 29 Sep 2007 05:42:11 +0000 (-0700) Subject: Fix a potential NULL pointer dereference in uli526x_interrupt() in drivers/net/tulip... X-Git-Tag: v2.6.24-rc1~1454^2~234 X-Git-Url: https://openfabrics.org/gitweb/?a=commitdiff_plain;h=1f8f4559f8c5829348a010a9e0bbb423310060d1;p=~emulex%2Finfiniband.git Fix a potential NULL pointer dereference in uli526x_interrupt() in drivers/net/tulip/uli526x.c 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 Cc: Grant Grundler Acked-by: Jeff Garzik Acked-by: Kyle McMartin Signed-off-by: Andrew Morton Signed-off-by: Jeff Garzik --- diff --git a/drivers/net/tulip/uli526x.c b/drivers/net/tulip/uli526x.c index e64bde46822..76e55612430 100644 --- a/drivers/net/tulip/uli526x.c +++ b/drivers/net/tulip/uli526x.c @@ -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);