From: Nicolas Kaiser Date: Fri, 22 Oct 2010 10:47:24 +0000 (+0200) Subject: block2mtd: dubious assignment X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=89a82280a8e632b7a5b0ce70dd5bccfa2d3bc2c5;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git 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 Acked-By: Joern Engel Signed-off-by: David Woodhouse --- 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) } else instr->state = MTD_ERASE_DONE; - instr->state = MTD_ERASE_DONE; mtd_erase_callback(instr); return err; }