Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=bcfef8c3681fa59b653871682956a8fdf5c27c5a
Commit:     bcfef8c3681fa59b653871682956a8fdf5c27c5a
Parent:     0da18e3883d18ac716ad8cc07df9bd30933807ac
Author:     Jesper Juhl <[EMAIL PROTECTED]>
AuthorDate: Fri Sep 28 22:42:09 2007 -0700
Committer:  David S. Miller <[EMAIL PROTECTED]>
CommitDate: Wed Oct 10 16:53:51 2007 -0700

    Avoid possible NULL pointer deref in 3c359 driver
    
    In xl_freemem(), if dev_if is NULL, the line
    
      struct xl_private *xl_priv =(struct xl_private *)dev->priv;
    
    will cause a NULL pointer dereference.
    
    (akpm: don't try to fix it: just delete the pointless test-for-null)
    
    Signed-off-by: Jesper Juhl <[EMAIL PROTECTED]>
    Signed-off-by: Andrew Morton <[EMAIL PROTECTED]>
    Signed-off-by: Jeff Garzik <[EMAIL PROTECTED]>
---
 drivers/net/tokenring/3c359.c |    5 -----
 1 files changed, 0 insertions(+), 5 deletions(-)

diff --git a/drivers/net/tokenring/3c359.c b/drivers/net/tokenring/3c359.c
index 88d03c0..7224d36 100644
--- a/drivers/net/tokenring/3c359.c
+++ b/drivers/net/tokenring/3c359.c
@@ -1045,11 +1045,6 @@ static irqreturn_t xl_interrupt(int irq, void *dev_id)
        u8 __iomem * xl_mmio = xl_priv->xl_mmio ; 
        u16 intstatus, macstatus  ;
 
-       if (!dev) { 
-               printk(KERN_WARNING "Device structure dead, aaahhhh !\n") ;
-               return IRQ_NONE; 
-       }
-
        intstatus = readw(xl_mmio + MMIO_INTSTATUS) ;  
 
        if (!(intstatus & 1)) /* We didn't generate the interrupt */
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to