mtd: maps: ceiva: do not return random numbers
Linux-MTD Mailing List
linux-mtd at lists.infradead.org
Thu Feb 25 07:59:05 EST 2010
Gitweb: http://git.infradead.org/?p=mtd-2.6.git;a=commit;h=9a5dea7b1046510fdcc81c523405494fd07ec303
Commit: 9a5dea7b1046510fdcc81c523405494fd07ec303
Parent: dad0db318b391ddb9845ac5e52044f921219bf69
Author: Artem Bityutskiy <Artem.Bityutskiy at nokia.com>
AuthorDate: Tue Feb 9 13:42:39 2010 +0200
Committer: David Woodhouse <David.Woodhouse at intel.com>
CommitDate: Thu Feb 25 12:50:45 2010 +0000
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 <Artem.Bityutskiy at nokia.com>
Signed-off-by: David Woodhouse <David.Woodhouse at intel.com>
---
drivers/mtd/maps/ceiva.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/drivers/mtd/maps/ceiva.c b/drivers/mtd/maps/ceiva.c
index d41f347..c09f4f5 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()) {
More information about the linux-mtd-cvs
mailing list