]> git.ipfire.org Git - people/ms/u-boot.git/commitdiff
NAND: Update read_read_subpage API check
authorSandeep Paulraj <s-paulraj@ti.com>
Mon, 16 Nov 2009 18:32:01 +0000 (13:32 -0500)
committerScott Wood <scottwood@freescale.com>
Wed, 18 Nov 2009 20:26:40 +0000 (14:26 -0600)
This patch updates a check condition in the NAND driver.
The check condition is similat to what is in linux/next.

Signed-off-by: Sandeep Paulraj <s-paulraj@ti.com>
drivers/mtd/nand/nand_base.c

index 6da261c0415b4b7954006aad9b7912ae55870464..7171bdd51b421441f401df6b70cb1b56bfdea3f1 100644 (file)
@@ -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;