Browse Source

mtd: tests/read: initialize buffer for whole next page

fix: do block-buffer initialize for the whole next page to zero.

Signed-off-by: Christian Herzig <christian.herzig@keymile.com>
Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
Christian Herzig 12 years ago
parent
commit
d8b1e34e24
1 changed files with 1 additions and 1 deletions
  1. 1 1
      drivers/mtd/tests/mtd_readtest.c

+ 1 - 1
drivers/mtd/tests/mtd_readtest.c

@@ -51,7 +51,7 @@ static int read_eraseblock_by_page(int ebnum)
 	void *oobbuf = iobuf1;
 
 	for (i = 0; i < pgcnt; i++) {
-		memset(buf, 0 , pgcnt);
+		memset(buf, 0 , pgsize);
 		ret = mtd_read(mtd, addr, pgsize, &read, buf);
 		if (ret == -EUCLEAN)
 			ret = 0;