diff options
Diffstat (limited to 'drivers/mtd')
-rw-r--r-- | drivers/mtd/onenand/onenand_base.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/mtd/onenand/onenand_base.c b/drivers/mtd/onenand/onenand_base.c index 0037cee5ef27..e80857b3bb83 100644 --- a/drivers/mtd/onenand/onenand_base.c +++ b/drivers/mtd/onenand/onenand_base.c | |||
@@ -298,7 +298,7 @@ static int onenand_wait(struct mtd_info *mtd, int state) | |||
298 | unsigned long timeout; | 298 | unsigned long timeout; |
299 | unsigned int flags = ONENAND_INT_MASTER; | 299 | unsigned int flags = ONENAND_INT_MASTER; |
300 | unsigned int interrupt = 0; | 300 | unsigned int interrupt = 0; |
301 | unsigned int ctrl, ecc; | 301 | unsigned int ctrl; |
302 | 302 | ||
303 | /* The 20 msec is enough */ | 303 | /* The 20 msec is enough */ |
304 | timeout = jiffies + msecs_to_jiffies(20); | 304 | timeout = jiffies + msecs_to_jiffies(20); |
@@ -324,7 +324,7 @@ static int onenand_wait(struct mtd_info *mtd, int state) | |||
324 | } | 324 | } |
325 | 325 | ||
326 | if (interrupt & ONENAND_INT_READ) { | 326 | if (interrupt & ONENAND_INT_READ) { |
327 | 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) |
@@ -332,6 +332,7 @@ static int onenand_wait(struct mtd_info *mtd, int state) | |||
332 | else if (ecc & ONENAND_ECC_1BIT_ALL) | 332 | else if (ecc & ONENAND_ECC_1BIT_ALL) |
333 | mtd->ecc_stats.corrected++; | 333 | mtd->ecc_stats.corrected++; |
334 | } | 334 | } |
335 | return ecc; | ||
335 | } | 336 | } |
336 | 337 | ||
337 | return 0; | 338 | return 0; |