diff options
author | Jiri Kosina <jkosina@suse.cz> | 2010-08-11 11:36:51 +0400 |
---|---|---|
committer | Jiri Kosina <jkosina@suse.cz> | 2010-08-11 11:36:51 +0400 |
commit | 6396fc3b3ff3f6b942992b653a62df11dcef9bea (patch) | |
tree | db3c7cbe833b43c653adc99f70941431c5ff7c4e /drivers/mtd/tests | |
parent | 4785879e4d340e24e54f6de2ccfc42728b912808 (diff) | |
parent | 3d30701b58970425e1d45994d6cb82f828924fdd (diff) | |
download | linux-6396fc3b3ff3f6b942992b653a62df11dcef9bea.tar.xz |
Merge branch 'master' into for-next
Conflicts:
fs/exofs/inode.c
Diffstat (limited to 'drivers/mtd/tests')
-rw-r--r-- | drivers/mtd/tests/mtd_pagetest.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/drivers/mtd/tests/mtd_pagetest.c b/drivers/mtd/tests/mtd_pagetest.c index 6bc1b8276c62..00b937e38c1d 100644 --- a/drivers/mtd/tests/mtd_pagetest.c +++ b/drivers/mtd/tests/mtd_pagetest.c @@ -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; @@ -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); @@ -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; } |