summaryrefslogtreecommitdiffstats
path: root/drivers/mtd/tests
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/mtd/tests')
-rw-r--r--drivers/mtd/tests/mtd_readtest.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/mtd/tests/mtd_readtest.c b/drivers/mtd/tests/mtd_readtest.c
index 31f505cc942a..266de04b6d29 100644
--- a/drivers/mtd/tests/mtd_readtest.c
+++ b/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;