From 25a1191763ab2e1f2f5df9ffcc72b6bd83d48523 Mon Sep 17 00:00:00 2001 From: Xiang Xiao Date: Mon, 1 May 2023 01:06:50 +0800 Subject: [PATCH] mtd/nand: Correct the check of erasing bad blocks Signed-off-by: Xiang Xiao --- drivers/mtd/mtd_nand.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/mtd/mtd_nand.c b/drivers/mtd/mtd_nand.c index 4e44d8ace3..10551a1a27 100644 --- a/drivers/mtd/mtd_nand.c +++ b/drivers/mtd/mtd_nand.c @@ -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 */