diff options
-rw-r--r-- | drivers/mtd/nand/nand_bbt.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/mtd/nand/nand_bbt.c b/drivers/mtd/nand/nand_bbt.c index cbf9b695c6f2..fcfaf06beaaf 100644 --- a/drivers/mtd/nand/nand_bbt.c +++ b/drivers/mtd/nand/nand_bbt.c | |||
@@ -313,8 +313,7 @@ static int scan_read_raw_oob(struct mtd_info *mtd, uint8_t *buf, loff_t offs, | |||
313 | 313 | ||
314 | res = mtd->read_oob(mtd, offs, &ops); | 314 | res = mtd->read_oob(mtd, offs, &ops); |
315 | 315 | ||
316 | /* Ignore ECC errors when checking for BBM */ | 316 | if (res) |
317 | if (res && res != -EUCLEAN && res != -EBADMSG) | ||
318 | return res; | 317 | return res; |
319 | 318 | ||
320 | buf += mtd->oobsize + mtd->writesize; | 319 | buf += mtd->oobsize + mtd->writesize; |
@@ -400,7 +399,8 @@ static int scan_block_full(struct mtd_info *mtd, struct nand_bbt_descr *bd, | |||
400 | int ret, j; | 399 | int ret, j; |
401 | 400 | ||
402 | ret = scan_read_raw_oob(mtd, buf, offs, readlen); | 401 | ret = scan_read_raw_oob(mtd, buf, offs, readlen); |
403 | if (ret) | 402 | /* Ignore ECC errors when checking for BBM */ |
403 | if (ret && ret != -EUCLEAN && ret != -EBADMSG) | ||
404 | return ret; | 404 | return ret; |
405 | 405 | ||
406 | for (j = 0; j < len; j++, buf += scanlen) { | 406 | for (j = 0; j < len; j++, buf += scanlen) { |