summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSandeep Paulraj <s-paulraj@ti.com>2009-11-07 14:25:03 -0500
committerScott Wood <scottwood@freescale.com>2009-11-13 16:56:16 -0600
commit18b5a4b43af3c8359cb568f4fa32d6b9dcebbf26 (patch)
tree04de921d50251ea4fbc1ef88180f7f7aec4a3c61
parente25ee0396226fb56679702d0361cf2645504e7f6 (diff)
downloadu-boot-imx-18b5a4b43af3c8359cb568f4fa32d6b9dcebbf26.zip
u-boot-imx-18b5a4b43af3c8359cb568f4fa32d6b9dcebbf26.tar.gz
u-boot-imx-18b5a4b43af3c8359cb568f4fa32d6b9dcebbf26.tar.bz2
NAND: Update check condition for nand_read_page_hwecc API
The patch updates the check condition for determining whether the ECC corrections has failed. This makes it similar to what is in the kernel NAND driver. Signed-off-by: Sandeep Paulraj <s-paulraj@ti.com>
-rw-r--r--drivers/mtd/nand/nand_base.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/mtd/nand/nand_base.c b/drivers/mtd/nand/nand_base.c
index cfd582a..52b0c1a 100644
--- a/drivers/mtd/nand/nand_base.c
+++ b/drivers/mtd/nand/nand_base.c
@@ -1062,7 +1062,7 @@ static int nand_read_page_hwecc(struct mtd_info *mtd, struct nand_chip *chip,
int stat;
stat = chip->ecc.correct(mtd, p, &ecc_code[i], &ecc_calc[i]);
- if (stat == -1)
+ if (stat < 0)
mtd->ecc_stats.failed++;
else
mtd->ecc_stats.corrected += stat;