Skip to content

Commit

Permalink
block2mtd: dubious assignment
Browse files Browse the repository at this point in the history
When block2mtd_erase fails, a duplicated assignment instantly
changes instr->state from MTD_ERASE_FAILED to MTD_ERASE_DONE.

It looks to me like this might not be intended, or is it?

Signed-off-by: Nicolas Kaiser <nikai@nikai.net>
Acked-By: Joern Engel <joern@logfs.org>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
  • Loading branch information
Nicolas Kaiser authored and David Woodhouse committed Oct 26, 2010
1 parent 0b824d2 commit 89a8228
Showing 1 changed file with 0 additions and 1 deletion.
1 change: 0 additions & 1 deletion drivers/mtd/devices/block2mtd.c
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,6 @@ static int block2mtd_erase(struct mtd_info *mtd, struct erase_info *instr)
} else
instr->state = MTD_ERASE_DONE;

instr->state = MTD_ERASE_DONE;
mtd_erase_callback(instr);
return err;
}
Expand Down

0 comments on commit 89a8228

Please sign in to comment.