Skip to content

Commit

Permalink
mtd: maps: ceiva: do not return random numbers
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Artem Bityutskiy authored and David Woodhouse committed Feb 25, 2010
1 parent dad0db3 commit 9a5dea7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/mtd/maps/ceiva.c
Original file line number Diff line number Diff line change
Expand Up @@ -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()) {
Expand Down

0 comments on commit 9a5dea7

Please sign in to comment.