|
@@ -789,7 +789,7 @@ static int nand_read_page_swecc(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;
|
|
@@ -833,7 +833,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;
|
|
@@ -874,7 +874,7 @@ static int nand_read_page_syndrome(struct mtd_info *mtd, struct nand_chip *chip,
|
|
|
chip->read_buf(mtd, oob, eccbytes);
|
|
|
stat = chip->ecc.correct(mtd, p, oob, NULL);
|
|
|
|
|
|
- if (stat == -1)
|
|
|
+ if (stat < 0)
|
|
|
mtd->ecc_stats.failed++;
|
|
|
else
|
|
|
mtd->ecc_stats.corrected += stat;
|