mtd: unify initialization of erase_info->fail_addr
Initialization of 'erase_info->fail_addr' to MTD_FAIL_ADDR_UNKNOWN prior erase operation is duplicated accross several MTD drivers, and also taken care of by some MTD users as well. Harmonize it: initialize 'fail_addr' within 'mtd_erase()' interface. Signed-off-by: Shmulik Ladkani <shmulik.ladkani@gmail.com> Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com> Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
This commit is contained in:

committed by
David Woodhouse

parent
637957551c
commit
3b27dac039
@@ -426,8 +426,6 @@ static int concat_erase(struct mtd_info *mtd, struct erase_info *instr)
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
instr->fail_addr = MTD_FAIL_ADDR_UNKNOWN;
|
||||
|
||||
/* make a local copy of instr to avoid modifying the caller's struct */
|
||||
erase = kmalloc(sizeof (struct erase_info), GFP_KERNEL);
|
||||
|
||||
|
Reference in New Issue
Block a user