Commit 9a5dea7b authored by Artem Bityutskiy's avatar Artem Bityutskiy Committed by David Woodhouse

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: default avatarArtem Bityutskiy <Artem.Bityutskiy@nokia.com>
Signed-off-by: default avatarDavid Woodhouse <David.Woodhouse@intel.com>
parent dad0db31
...@@ -253,7 +253,7 @@ static void __exit clps_destroy_mtd(struct clps_info *clps, struct mtd_info *mtd ...@@ -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) static int __init clps_setup_flash(void)
{ {
int nr; int nr = 0;
#ifdef CONFIG_ARCH_CEIVA #ifdef CONFIG_ARCH_CEIVA
if (machine_is_ceiva()) { if (machine_is_ceiva()) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment