aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/mtd/devices
diff options
context:
space:
mode:
authorNicolas Kaiser <nikai@nikai.net>2010-10-22 06:47:24 -0400
committerDavid Woodhouse <David.Woodhouse@intel.com>2010-10-26 05:58:00 -0400
commit89a82280a8e632b7a5b0ce70dd5bccfa2d3bc2c5 (patch)
treeedf833a4eca968961cca4d3612e6b405b9bcf73f /drivers/mtd/devices
parent0b824d2b10eacd496c608a7c41a046862d48563b (diff)
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@nikai.net> Acked-By: Joern Engel <joern@logfs.org> Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
Diffstat (limited to 'drivers/mtd/devices')
-rw-r--r--drivers/mtd/devices/block2mtd.c1
1 files changed, 0 insertions, 1 deletions
diff --git a/drivers/mtd/devices/block2mtd.c b/drivers/mtd/devices/block2mtd.c
index 93651865ddbe..2cf0cc6a4189 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)
91 } else 91 } else
92 instr->state = MTD_ERASE_DONE; 92 instr->state = MTD_ERASE_DONE;
93 93
94 instr->state = MTD_ERASE_DONE;
95 mtd_erase_callback(instr); 94 mtd_erase_callback(instr);
96 return err; 95 return err;
97} 96}