Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 207762
b: refs/heads/master
c: 7fc14bc
h: refs/heads/master
v: v3
  • Loading branch information
Roel Kluin authored and David Woodhouse committed Aug 2, 2010
1 parent 403fb57 commit 1f313d7
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 6 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: ece0ac98a13a555e6d46a02225fa15934abe7a3d
refs/heads/master: 7fc14bcee0fc0fe1b7e1bd78d4fc0da395ebef35
9 changes: 4 additions & 5 deletions trunk/drivers/mtd/tests/mtd_pagetest.c
Original file line number Diff line number Diff line change
Expand Up @@ -310,7 +310,7 @@ static int crosstest(void)
static int erasecrosstest(void)
{
size_t read = 0, written = 0;
int err = 0, i, ebnum, ok = 1, ebnum2;
int err = 0, i, ebnum, ebnum2;
loff_t addr0;
char *readbuf = twopages;

Expand Down Expand Up @@ -357,8 +357,7 @@ static int erasecrosstest(void)
if (memcmp(writebuf, readbuf, pgsize)) {
printk(PRINT_PREF "verify failed!\n");
errcnt += 1;
ok = 0;
return err;
return -1;
}

printk(PRINT_PREF "erasing block %d\n", ebnum);
Expand Down Expand Up @@ -396,10 +395,10 @@ static int erasecrosstest(void)
if (memcmp(writebuf, readbuf, pgsize)) {
printk(PRINT_PREF "verify failed!\n");
errcnt += 1;
ok = 0;
return -1;
}

if (ok && !err)
if (!err)
printk(PRINT_PREF "erasecrosstest ok\n");
return err;
}
Expand Down

0 comments on commit 1f313d7

Please sign in to comment.