diff --git a/drivers/mtd/nand/nand_base.c b/drivers/mtd/nand/nand_base.c index 670720a..426ad9b 100644 --- a/drivers/mtd/nand/nand_base.c +++ b/drivers/mtd/nand/nand_base.c @@ -445,10 +445,7 @@ { struct nand_chip *chip = mtd->priv; - if (IS_ENABLED(CONFIG_NAND_BBT)) { - if (!chip->bbt) - return chip->block_bad(mtd, ofs, getchip); - + if (IS_ENABLED(CONFIG_NAND_BBT) && chip->bbt) { /* Return info from the table */ return nand_isbad_bbt(mtd, ofs, allowbbt); }