Skip to contentSkip to conversation

Missing return in drivers/net/wan/pci200syn.c

PATCH New Eric Sesterhenn 1 participant 1 message Jun 21, 2006

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Missing return in drivers/net/wan/pci200syn.c

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)

drivers/net/wan/pci200syn.c renamed from drivers/net/wan/pci200syn.c.orig +1 -0
@@ -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 */