From d8b1e34e248d89f43bab18704894d537dc0b497e Mon Sep 17 00:00:00 2001 From: Christian Herzig Date: Fri, 23 Nov 2012 15:31:26 +0100 Subject: 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 Signed-off-by: Artem Bityutskiy --- drivers/mtd/tests/mtd_readtest.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'drivers/mtd/tests/mtd_readtest.c') 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; -- cgit v1.2.3