[Patch] Missing return in drivers/net/wan/pci200syn.c

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



hi,

if card->plxbase == NULL we call the cleanup function
pci200_pci_remove_one() but continue initializing
the driver and dereferencing the pointer. This
was found by coverity (bug id #195)

Signed-off-by: Eric Sesterhenn <[email protected]>

--- linux-2.6.17-git2/drivers/net/wan/pci200syn.c.orig	2006-06-21 15:45:52.000000000 +0200
+++ linux-2.6.17-git2/drivers/net/wan/pci200syn.c	2006-06-21 15:46:12.000000000 +0200
@@ -358,6 +358,7 @@ static int __devinit pci200_pci_init_one
 	    card->rambase == NULL) {
 		printk(KERN_ERR "pci200syn: ioremap() failed\n");
 		pci200_pci_remove_one(pdev);
+		return -EFAULT;
 	}
 
 	/* Reset PLX */


-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux