Skip to contentSkip to conversation

NAND: Update read_read_subpage API check

PATCH New s-paulraj at ti.com 2 participants 2 messages Nov 16, 2009 – Nov 18, 2009

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 NAND: Update read_read_subpage API check

From: Sandeep Paulraj <[email protected]>

This patch updates a check condition in the NAND driver. The check condition is similat to what is in linux/next.

---
 drivers/mtd/nand/nand_base.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
drivers/mtd/nand/nand_base.c +1 -1
index 6da261c..7171bdd 100644
@@ -1061,7 +1061,7 @@ static int nand_read_subpage(struct mtd_info *mtd, struct nand_chip *chip, uint3
 		int stat;
 
 		stat = chip->ecc.correct(mtd, p, &chip->buffers->ecccode[i], &chip->buffers->ecccalc[i]);
-		if (stat < 0)
+		if (stat == -1)
 			mtd->ecc_stats.failed++;
 		else
 			mtd->ecc_stats.corrected += stat;
Signature · 1 line
1.6.0.4
#1 lore raw

PATCH 1/1 NAND: Update read_read_subpage API check

Quoted 4 lines · s-paulraj at ti.com

From: Sandeep Paulraj <[email protected]>

This patch updates a check condition in the NAND driver. The check condition is similat to what is in linux/next.

Hmm, even in Linux all other invocations of ecc.correct check < 0 rather than == -1. I've applied it for consistency with upstream, though.

-Scott