diff mbox

[12/39] mtd: nand: denali: return 0 for uncorrectable ECC error

Message ID 1480183585-592-13-git-send-email-yamada.masahiro@socionext.com
State New
Headers show

Commit Message

Masahiro Yamada Nov. 26, 2016, 6:05 p.m. UTC
When uncorrectable ECC error happens, whether the page is erased or
not, the ecc.read_page() should return zero.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>

---

 drivers/mtd/nand/denali.c | 1 +
 1 file changed, 1 insertion(+)

-- 
2.7.4


______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/
diff mbox

Patch

diff --git a/drivers/mtd/nand/denali.c b/drivers/mtd/nand/denali.c
index ae9a8d2..a6445d9 100644
--- a/drivers/mtd/nand/denali.c
+++ b/drivers/mtd/nand/denali.c
@@ -1160,6 +1160,7 @@  static int denali_read_page(struct mtd_info *mtd, struct nand_chip *chip,
 		if (!is_erased(buf, mtd->writesize) ||
 		    !is_erased(chip->oob_poi, mtd->oobsize))
 			mtd->ecc_stats.failed++;
+		return 0;
 	}
 	return max_bitflips;
 }