From: Artem Bityutskiy Date: Tue, 9 Feb 2010 11:42:39 +0000 (+0200) Subject: mtd: maps: ceiva: do not return random numbers X-Git-Tag: v2.6.35-rc1~465^2~117 X-Git-Url: https://openfabrics.org/gitweb/?a=commitdiff_plain;h=9a5dea7b1046510fdcc81c523405494fd07ec303;p=~emulex%2Finfiniband.git mtd: maps: ceiva: do not return random numbers 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 Signed-off-by: David Woodhouse --- diff --git a/drivers/mtd/maps/ceiva.c b/drivers/mtd/maps/ceiva.c index d41f34766e5..c09f4f57093 100644 --- a/drivers/mtd/maps/ceiva.c +++ b/drivers/mtd/maps/ceiva.c @@ -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()) {