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>
This commit is contained in:
parent
0b824d2b10
commit
89a82280a8
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue