aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/mtd
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/mtd')
-rw-r--r--drivers/mtd/onenand/onenand_base.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/drivers/mtd/onenand/onenand_base.c b/drivers/mtd/onenand/onenand_base.c
index a8c426bf47a4..dd2835569092 100644
--- a/drivers/mtd/onenand/onenand_base.c
+++ b/drivers/mtd/onenand/onenand_base.c
@@ -1711,13 +1711,14 @@ static int onenand_erase(struct mtd_info *mtd, struct erase_info *instr)
1711erase_exit: 1711erase_exit:
1712 1712
1713 ret = instr->state == MTD_ERASE_DONE ? 0 : -EIO; 1713 ret = instr->state == MTD_ERASE_DONE ? 0 : -EIO;
1714 /* Do call back function */
1715 if (!ret)
1716 mtd_erase_callback(instr);
1717 1714
1718 /* Deselect and wake up anyone waiting on the device */ 1715 /* Deselect and wake up anyone waiting on the device */
1719 onenand_release_device(mtd); 1716 onenand_release_device(mtd);
1720 1717
1718 /* Do call back function */
1719 if (!ret)
1720 mtd_erase_callback(instr);
1721
1721 return ret; 1722 return ret;
1722} 1723}
1723 1724