[PATCH] nandtest: set oldstats.failed

Jan Weitzel j.weitzel at phytec.de
Thu Nov 24 05:57:21 EST 2011


if new ecc failed occures oldstats.corrected is updated not oldstats.failed

Signed-off-by: Jan Weitzel <j.weitzel at phytec.de>
---
 nandtest.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/nandtest.c b/nandtest.c
index dc28d09..db7f427 100644
--- a/nandtest.c
+++ b/nandtest.c
@@ -105,7 +105,7 @@ int erase_and_write(loff_t ofs, unsigned char *data, unsigned char *rbuf)
 	}
 	if (newstats.failed > oldstats.failed) {
 		printf("\nECC failed at %08x\n", (unsigned) ofs);
-		oldstats.corrected = newstats.corrected;
+		oldstats.failed = newstats.failed;
 	}
 	if (len < meminfo.erasesize)
 		exit(1);
-- 
1.7.0.4




More information about the linux-mtd mailing list