From: Christian Herzig Date: Fri, 23 Nov 2012 14:31:26 +0000 (+0100) Subject: mtd: tests/read: initialize buffer for whole next page X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=d8b1e34e248d89f43bab18704894d537dc0b497e;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git 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 --- 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;