Commit 89a82280 authored by Nicolas Kaiser's avatar Nicolas Kaiser Committed by David Woodhouse

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: default avatarNicolas Kaiser <nikai@nikai.net>
Acked-By: default avatarJoern Engel <joern@logfs.org>
Signed-off-by: default avatarDavid Woodhouse <David.Woodhouse@intel.com>
parent 0b824d2b
......@@ -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;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment