aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/mtd/mtdpart.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/drivers/mtd/mtdpart.c b/drivers/mtd/mtdpart.c
index 01e4afff42b0..1af989023c66 100644
--- a/drivers/mtd/mtdpart.c
+++ b/drivers/mtd/mtdpart.c
@@ -200,6 +200,11 @@ static int part_erase (struct mtd_info *mtd, struct erase_info *instr)
200 return -EINVAL; 200 return -EINVAL;
201 instr->addr += part->offset; 201 instr->addr += part->offset;
202 ret = part->master->erase(part->master, instr); 202 ret = part->master->erase(part->master, instr);
203 if (ret) {
204 if (instr->fail_addr != 0xffffffff)
205 instr->fail_addr -= part->offset;
206 instr->addr -= part->offset;
207 }
203 return ret; 208 return ret;
204} 209}
205 210
@@ -560,4 +565,3 @@ EXPORT_SYMBOL_GPL(deregister_mtd_parser);
560MODULE_LICENSE("GPL"); 565MODULE_LICENSE("GPL");
561MODULE_AUTHOR("Nicolas Pitre <nico@cam.org>"); 566MODULE_AUTHOR("Nicolas Pitre <nico@cam.org>");
562MODULE_DESCRIPTION("Generic support for partitioning of MTD devices"); 567MODULE_DESCRIPTION("Generic support for partitioning of MTD devices");
563