diff options
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/mtd/onenand/onenand_base.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/mtd/onenand/onenand_base.c b/drivers/mtd/onenand/onenand_base.c index abbe160b4309..2ea07f5723d1 100644 --- a/drivers/mtd/onenand/onenand_base.c +++ b/drivers/mtd/onenand/onenand_base.c | |||
@@ -327,12 +327,12 @@ static int onenand_wait(struct mtd_info *mtd, int state) | |||
327 | int ecc = this->read_word(this->base + ONENAND_REG_ECC_STATUS); | 327 | int ecc = this->read_word(this->base + ONENAND_REG_ECC_STATUS); |
328 | if (ecc) { | 328 | if (ecc) { |
329 | DEBUG(MTD_DEBUG_LEVEL0, "onenand_wait: ECC error = 0x%04x\n", ecc); | 329 | DEBUG(MTD_DEBUG_LEVEL0, "onenand_wait: ECC error = 0x%04x\n", ecc); |
330 | if (ecc & ONENAND_ECC_2BIT_ALL) | 330 | if (ecc & ONENAND_ECC_2BIT_ALL) { |
331 | mtd->ecc_stats.failed++; | 331 | mtd->ecc_stats.failed++; |
332 | else if (ecc & ONENAND_ECC_1BIT_ALL) | 332 | return ecc; |
333 | } else if (ecc & ONENAND_ECC_1BIT_ALL) | ||
333 | mtd->ecc_stats.corrected++; | 334 | mtd->ecc_stats.corrected++; |
334 | } | 335 | } |
335 | return ecc; | ||
336 | } | 336 | } |
337 | 337 | ||
338 | return 0; | 338 | return 0; |