[PATCH 1/5] mtd: OneNAND: return read error for 4KiB page read

Adrian Hunter adrian.hunter at nokia.com
Tue Feb 8 05:02:38 EST 2011


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 at nokia.com>
---
 drivers/mtd/onenand/onenand_base.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/drivers/mtd/onenand/onenand_base.c b/drivers/mtd/onenand/onenand_base.c
index bac41ca..38e6d76 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);
-- 
1.7.0.4




More information about the linux-mtd mailing list