summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAdrian Hunter <adrian.hunter@nokia.com>2011-02-08 12:02:38 +0200
committerDavid Woodhouse <David.Woodhouse@intel.com>2011-03-11 14:22:44 +0000
commitb085058fe556328443f982d892c9657b3aff9d4a (patch)
tree95b05c27c2c312afd360c61fa0138d9b67c8a2a1
parent7912a5e7f37512d8d105785046137435b70347ce (diff)
mtd: OneNAND: return read error for 4KiB page read
When reading using the 4KiB page read function, I/O errors could be ignored if more than 1 page was read at a time. Signed-off-by: Adrian Hunter <adrian.hunter@nokia.com> Acked-by: Kyungmin Park <kyungmin.park@samsung.com> Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com> Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
-rw-r--r--drivers/mtd/onenand/onenand_base.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/mtd/onenand/onenand_base.c b/drivers/mtd/onenand/onenand_base.c
index bac41caa8df7..38e6d76bcc0e 100644
--- a/drivers/mtd/onenand/onenand_base.c
+++ b/drivers/mtd/onenand/onenand_base.c
@@ -1132,6 +1132,8 @@ static int onenand_mlc_read_ops_nolock(struct mtd_info *mtd, loff_t from,
onenand_update_bufferram(mtd, from, !ret);
if (ret == -EBADMSG)
ret = 0;
+ if (ret)
+ break;
}
this->read_bufferram(mtd, ONENAND_DATARAM, buf, column, thislen);