Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

Nicolas Kaiser and committed by
David Woodhouse
89a82280 0b824d2b

-1
-1
drivers/mtd/devices/block2mtd.c
··· 91 91 } else 92 92 instr->state = MTD_ERASE_DONE; 93 93 94 - instr->state = MTD_ERASE_DONE; 95 94 mtd_erase_callback(instr); 96 95 return err; 97 96 }