mtd: maps: ceiva: do not return random numbers
authorArtem Bityutskiy <Artem.Bityutskiy@nokia.com>
Tue, 9 Feb 2010 11:42:39 +0000 (13:42 +0200)
committerDavid Woodhouse <David.Woodhouse@intel.com>
Thu, 25 Feb 2010 12:50:45 +0000 (12:50 +0000)
When machine_is_ceiva() returns zero, 'clps_setup_flash()' returns a
value of an unitialized variable. Fix this.

Spotted by David Binderman.

Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
drivers/mtd/maps/ceiva.c

index d41f34766e53177ea4d78259d815a75e1e2b2fee..c09f4f57093ee65e4a149b537cec45ef868be9ff 100644 (file)
@@ -253,7 +253,7 @@ static void __exit clps_destroy_mtd(struct clps_info *clps, struct mtd_info *mtd
 
 static int __init clps_setup_flash(void)
 {
-       int nr;
+       int nr = 0;
 
 #ifdef CONFIG_ARCH_CEIVA
        if (machine_is_ceiva()) {