summaryrefslogtreecommitdiff
path: root/drivers/mtd/nand/nand_bbt.c
diff options
context:
space:
mode:
authorBrian Norris <computersforpeace@gmail.com>2011-09-21 05:34:25 +0400
committerArtem Bityutskiy <artem.bityutskiy@intel.com>2011-09-21 10:19:06 +0400
commitd57f40544a41fdfe90fd863b6865138c5a82f1cc (patch)
tree4d5e8f6d0a62e8fa06ccfabd13fe9364b19db1b5 /drivers/mtd/nand/nand_bbt.c
parent7387ce773256f446bdd0280b2449b635441f906e (diff)
downloadlinux-d57f40544a41fdfe90fd863b6865138c5a82f1cc.tar.xz
mtd: utilize `mtd_is_*()' functions
Signed-off-by: Brian Norris <computersforpeace@gmail.com> Signed-off-by: Artem Bityutskiy <artem.bityutskiy@intel.com>
Diffstat (limited to 'drivers/mtd/nand/nand_bbt.c')
-rw-r--r--drivers/mtd/nand/nand_bbt.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/mtd/nand/nand_bbt.c b/drivers/mtd/nand/nand_bbt.c
index 7dbfce4a1a5b..584bdcb3c61a 100644
--- a/drivers/mtd/nand/nand_bbt.c
+++ b/drivers/mtd/nand/nand_bbt.c
@@ -400,7 +400,7 @@ static int scan_block_full(struct mtd_info *mtd, struct nand_bbt_descr *bd,
ret = scan_read_raw_oob(mtd, buf, offs, readlen);
/* Ignore ECC errors when checking for BBM */
- if (ret && ret != -EUCLEAN && ret != -EBADMSG)
+ if (ret && !mtd_is_bitflip_or_eccerr(ret))
return ret;
for (j = 0; j < len; j++, buf += scanlen) {
@@ -430,7 +430,7 @@ static int scan_block_fast(struct mtd_info *mtd, struct nand_bbt_descr *bd,
*/
ret = mtd->read_oob(mtd, offs, &ops);
/* Ignore ECC errors when checking for BBM */
- if (ret && ret != -EUCLEAN && ret != -EBADMSG)
+ if (ret && !mtd_is_bitflip_or_eccerr(ret))
return ret;
if (check_short_pattern(buf, bd))