NAND flash memories are allowed to contain some bad blocks, which fail
to write or fail to erase. Currently, chip erase operation breaks on
first failed block, leaving the rest of memory untouched. So, to do full
chip erase with failed blocks, manual fiddling with addresses is needed.
To avoid that, don't break the loop on erase fail, but keep the final
error status.
NAND flash memories are allowed to contain some bad blocks, which fail to write or fail to erase. Currently, chip erase operation breaks on first failed block, leaving the rest of memory untouched. So, to do full chip erase with failed blocks, manual fiddling with addresses is needed.
To avoid that, don't break the loop on erase fail, but keep the final error status.