Skip to contentSkip to conversation

atm: fore200e.c: fix uninitialized variable

PATCH In review Cong Ding 2 participants 2 messages Jan 14, 2013

Subsystems (3)
lore
Share & tools
lore

Cong Ding

author
#0 lore raw

PATCH 1/1 atm: fore200e.c: fix uninitialized variable

the variable err is uninitialized if all the macros in the function are disabled.

---
 drivers/atm/fore200e.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/atm/fore200e.c +1 -1
index 204814e..d4725fc 100644
@@ -2780,7 +2780,7 @@ static struct pci_driver fore200e_pca_driver = {
 
 static int __init fore200e_module_init(void)
 {
-	int err;
+	int err = 0;
 
 	printk(FORE200E "FORE Systems 200E-series ATM driver - version " FORE200E_VERSION "\n");
 
Signature · 1 line
1.7.9.5
maintainer
#1 lore raw

From: Cong Ding <[email protected]>
Date: Mon, 14 Jan 2013 18:57:43 +0000

Quoted 2 lines

the variable err is uninitialized if all the macros in the function are disabled.

Which is never possible because of the Kconfig dependencies.

This is what happens when you focus to narrowly on a piece of code, you take no context whatsoever into consideration.