block2mtd: dubious assignment
Linux-MTD Mailing List
linux-mtd at lists.infradead.org
Tue Oct 26 06:59:01 EDT 2010
Gitweb: http://git.infradead.org/?p=mtd-2.6.git;a=commit;h=89a82280a8e632b7a5b0ce70dd5bccfa2d3bc2c5
Commit: 89a82280a8e632b7a5b0ce70dd5bccfa2d3bc2c5
Parent: 0b824d2b10eacd496c608a7c41a046862d48563b
Author: Nicolas Kaiser <nikai at nikai.net>
AuthorDate: Fri Oct 22 12:47:24 2010 +0200
Committer: David Woodhouse <David.Woodhouse at intel.com>
CommitDate: Tue Oct 26 10:58:00 2010 +0100
block2mtd: dubious assignment
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 at nikai.net>
Acked-By: Joern Engel <joern at logfs.org>
Signed-off-by: David Woodhouse <David.Woodhouse at intel.com>
---
drivers/mtd/devices/block2mtd.c | 1 -
1 files changed, 0 insertions(+), 1 deletions(-)
diff --git a/drivers/mtd/devices/block2mtd.c b/drivers/mtd/devices/block2mtd.c
index 9365186..2cf0cc6 100644
--- a/drivers/mtd/devices/block2mtd.c
+++ b/drivers/mtd/devices/block2mtd.c
@@ -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;
}
More information about the linux-mtd-cvs
mailing list