mtd: OneNAND: return read error for 4KiB page read
authorAdrian Hunter <adrian.hunter@nokia.com>
Tue, 8 Feb 2011 10:02:38 +0000 (12:02 +0200)
committerDavid Woodhouse <David.Woodhouse@intel.com>
Fri, 11 Mar 2011 14:22:44 +0000 (14:22 +0000)
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>
drivers/mtd/onenand/onenand_base.c

index bac41caa8df72d8967caf93fd4f2fc96309f07c7..38e6d76bcc0ee656c3899e93a2122b0510ec5575 100644 (file)
@@ -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);