[PATCH 1/3] nandtest: Remove redundant check

Ezequiel Garcia ezequiel at vanguardiasur.com.ar
Mon Apr 28 06:14:17 PDT 2014


This commit removes a redundant 'len' check, which is already performed
just after the pread call.

Signed-off-by: Ezequiel Garcia <ezequiel at vanguardiasur.com.ar>
---
 nandtest.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/nandtest.c b/nandtest.c
index 1876bb2..fd78b95 100644
--- a/nandtest.c
+++ b/nandtest.c
@@ -107,8 +107,6 @@ int erase_and_write(loff_t ofs, unsigned char *data, unsigned char *rbuf)
 		printf("\nECC failed at %08x\n", (unsigned) ofs);
 		oldstats.failed = newstats.failed;
 	}
-	if (len < meminfo.erasesize)
-		exit(1);
 
 	printf("\r%08x: checking...", (unsigned)ofs);
 	fflush(stdout);
-- 
1.9.1




More information about the linux-mtd mailing list