Commit 3cd3a86b authored by Adrian Hunter's avatar Adrian Hunter Committed by David Woodhouse
Browse files

[MTD] [OneNAND] Avoid deadlock in erase callback; release chip lock first.

When the erase callback performs some other action on the flash, it's
highly likely to deadlock unless we actually release the chip lock
before calling it.

This patch mirrors that same change already done for NAND.
Signed-off-by: default avatarAdrian Hunter <>
Signed-off-by: default avatarDavid Woodhouse <>
parent 30a7eb29
......@@ -1711,13 +1711,14 @@ static int onenand_erase(struct mtd_info *mtd, struct erase_info *instr)
ret = instr->state == MTD_ERASE_DONE ? 0 : -EIO;
/* Do call back function */
if (!ret)
/* Deselect and wake up anyone waiting on the device */
/* Do call back function */
if (!ret)
return ret;
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment