Skip to content

Commit

Permalink
mtd: tests/read: initialize buffer for whole next page
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Christian Herzig authored and Artem Bityutskiy committed Dec 4, 2012
1 parent c0c70d9 commit d8b1e34
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/mtd/tests/mtd_readtest.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit d8b1e34

Please sign in to comment.