sf: call callback even if the mtd erase failed
PATCH 1/1 sf: call callback even if the mtd erase failed
Erase is an asynchronous operation. Device drivers are supposed to call instr->callback() whenever the operation completes, even if it completes with a failure.
Signed-off-by Thomas Chou <[email protected]>
--- drivers/mtd/spi/sf_mtd.c | 1 + 1 file changed, 1 insertion(+)
drivers/mtd/spi/sf_mtd.c +1 -0
@@ -24,6 +24,7 @@ static int spi_flash_mtd_erase(struct mtd_info *mtd, struct erase_info *instr)if (err) { instr->state =MTD_ERASE_FAILED ; instr->fail_addr =MTD_FAIL_ADDR_UNKNOWN ; +mtd_erase_callback (instr);return -EIO ; }
Signature · 1 line
2.5.0