mtd/nand: Correct the check of erasing bad blocks

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
This commit is contained in:
Xiang Xiao 2023-05-01 01:06:50 +08:00 committed by Petro Karashchenko
parent c1680d2f03
commit 25a1191763

View File

@ -355,7 +355,7 @@ static int nand_eraseblock(FAR struct nand_dev_s *nand, off_t block,
DEBUGASSERT(nand && nand->raw);
#ifdef CONFIG_MTD_NAND_BLOCKCHECK
if (scrub)
if (!scrub)
{
/* Check block status */