mirror of https://gitee.com/openkylin/linux.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 <christian.herzig@keymile.com> Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
This commit is contained in:
parent
c0c70d9ee6
commit
d8b1e34e24
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue