diff --git a/[refs] b/[refs] index 048387b38608..3e090eedd88e 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 105513cc4a25522f959788371bd612f987d4d184 +refs/heads/master: afa17de262633603dd65f89e9370f48e56b8c557 diff --git a/trunk/drivers/mtd/nand/nand_bbt.c b/trunk/drivers/mtd/nand/nand_bbt.c index cbf9b695c6f2..fcfaf06beaaf 100644 --- a/trunk/drivers/mtd/nand/nand_bbt.c +++ b/trunk/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, res = mtd->read_oob(mtd, offs, &ops); - /* Ignore ECC errors when checking for BBM */ - if (res && res != -EUCLEAN && res != -EBADMSG) + if (res) return res; buf += mtd->oobsize + mtd->writesize; @@ -400,7 +399,8 @@ static int scan_block_full(struct mtd_info *mtd, struct nand_bbt_descr *bd, int ret, j; ret = scan_read_raw_oob(mtd, buf, offs, readlen); - if (ret) + /* Ignore ECC errors when checking for BBM */ + if (ret && ret != -EUCLEAN && ret != -EBADMSG) return ret; for (j = 0; j < len; j++, buf += scanlen) {