diff options
Diffstat (limited to 'drivers/mtd/nand')
-rw-r--r-- | drivers/mtd/nand/nand_base.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/mtd/nand/nand_base.c b/drivers/mtd/nand/nand_base.c index b4e0e7723894..e29c1da7f56e 100644 --- a/drivers/mtd/nand/nand_base.c +++ b/drivers/mtd/nand/nand_base.c | |||
@@ -789,7 +789,7 @@ static int nand_read_page_swecc(struct mtd_info *mtd, struct nand_chip *chip, | |||
789 | int stat; | 789 | int stat; |
790 | 790 | ||
791 | stat = chip->ecc.correct(mtd, p, &ecc_code[i], &ecc_calc[i]); | 791 | stat = chip->ecc.correct(mtd, p, &ecc_code[i], &ecc_calc[i]); |
792 | if (stat == -1) | 792 | if (stat < 0) |
793 | mtd->ecc_stats.failed++; | 793 | mtd->ecc_stats.failed++; |
794 | else | 794 | else |
795 | mtd->ecc_stats.corrected += stat; | 795 | mtd->ecc_stats.corrected += stat; |
@@ -833,7 +833,7 @@ static int nand_read_page_hwecc(struct mtd_info *mtd, struct nand_chip *chip, | |||
833 | int stat; | 833 | int stat; |
834 | 834 | ||
835 | stat = chip->ecc.correct(mtd, p, &ecc_code[i], &ecc_calc[i]); | 835 | stat = chip->ecc.correct(mtd, p, &ecc_code[i], &ecc_calc[i]); |
836 | if (stat == -1) | 836 | if (stat < 0) |
837 | mtd->ecc_stats.failed++; | 837 | mtd->ecc_stats.failed++; |
838 | else | 838 | else |
839 | mtd->ecc_stats.corrected += stat; | 839 | mtd->ecc_stats.corrected += stat; |
@@ -874,7 +874,7 @@ static int nand_read_page_syndrome(struct mtd_info *mtd, struct nand_chip *chip, | |||
874 | chip->read_buf(mtd, oob, eccbytes); | 874 | chip->read_buf(mtd, oob, eccbytes); |
875 | stat = chip->ecc.correct(mtd, p, oob, NULL); | 875 | stat = chip->ecc.correct(mtd, p, oob, NULL); |
876 | 876 | ||
877 | if (stat == -1) | 877 | if (stat < 0) |
878 | mtd->ecc_stats.failed++; | 878 | mtd->ecc_stats.failed++; |
879 | else | 879 | else |
880 | mtd->ecc_stats.corrected += stat; | 880 | mtd->ecc_stats.corrected += stat; |