summaryrefslogtreecommitdiff
path: root/drivers/mtd/inftlcore.c
diff options
context:
space:
mode:
authorBrian Norris <computersforpeace@gmail.com>2011-09-20 18:34:25 -0700
committerArtem Bityutskiy <artem.bityutskiy@intel.com>2011-09-21 09:19:06 +0300
commitd57f40544a41fdfe90fd863b6865138c5a82f1cc (patch)
tree4d5e8f6d0a62e8fa06ccfabd13fe9364b19db1b5 /drivers/mtd/inftlcore.c
parent7387ce773256f446bdd0280b2449b635441f906e (diff)
downloadlwn-d57f40544a41fdfe90fd863b6865138c5a82f1cc.tar.gz
lwn-d57f40544a41fdfe90fd863b6865138c5a82f1cc.zip
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/inftlcore.c')
-rw-r--r--drivers/mtd/inftlcore.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/mtd/inftlcore.c b/drivers/mtd/inftlcore.c
index 652065e47a79..dd034efd1875 100644
--- a/drivers/mtd/inftlcore.c
+++ b/drivers/mtd/inftlcore.c
@@ -346,7 +346,7 @@ static u16 INFTL_foldchain(struct INFTLrecord *inftl, unsigned thisVUC, unsigned
ret = mtd->read(mtd, (inftl->EraseSize * BlockMap[block]) +
(block * SECTORSIZE), SECTORSIZE, &retlen,
movebuf);
- if (ret < 0 && ret != -EUCLEAN) {
+ if (ret < 0 && !mtd_is_bitflip(ret)) {
ret = mtd->read(mtd,
(inftl->EraseSize * BlockMap[block]) +
(block * SECTORSIZE), SECTORSIZE,
@@ -917,7 +917,7 @@ foundit:
int ret = mtd->read(mtd, ptr, SECTORSIZE, &retlen, buffer);
/* Handle corrected bit flips gracefully */
- if (ret < 0 && ret != -EUCLEAN)
+ if (ret < 0 && !mtd_is_bitflip(ret))
return -EIO;
}
return 0;