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

From: Eric Sesterhenn
Date: Wed Jun 21 2006 - 09:48:10 EST


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 <snakebyte@xxxxxx>

--- 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 majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/