Skip to content
Snippets Groups Projects
Commit 9e957aa4 authored by Thomas Chou's avatar Thomas Chou
Browse files

altera_qspi: call callback even if the 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's avatarThomas Chou <thomas@wytron.com.tw>
parent 78680314
No related branches found
No related tags found
No related merge requests found
......@@ -146,6 +146,7 @@ static int altera_qspi_erase(struct mtd_info *mtd, struct erase_info *instr)
debug("erase %08x fail %x\n", sect, stat);
writel(stat, &regs->isr); /* clear isr */
instr->state = MTD_ERASE_FAILED;
mtd_erase_callback(instr);
return -EIO;
}
addr += mtd->erasesize;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment