diff options
author | Akinobu Mita <akinobu.mita@gmail.com> | 2013-08-15 17:55:08 +0400 |
---|---|---|
committer | David Woodhouse <David.Woodhouse@intel.com> | 2013-08-31 00:36:05 +0400 |
commit | abc173ad84e50645f9136ea56afa9f86c98bf349 (patch) | |
tree | ab33103502169514f85a0a5013b015f5c3f1f3c0 /drivers/mtd/tests/stresstest.c | |
parent | 0d58f6ee0106256c47db9640141469d1ed80819a (diff) | |
download | linux-abc173ad84e50645f9136ea56afa9f86c98bf349.tar.xz |
mtd: tests: incorporate error message for mtdtest_read()
All callers of mtdtest_read() print the same error message on failure.
This incorporates the error message to mtdtest_read() and removes them
from the callers.
Signed-off-by: Akinobu Mita <akinobu.mita@gmail.com>
Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
Diffstat (limited to 'drivers/mtd/tests/stresstest.c')
-rw-r--r-- | drivers/mtd/tests/stresstest.c | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/drivers/mtd/tests/stresstest.c b/drivers/mtd/tests/stresstest.c index 169524845401..6c9e23f40cbc 100644 --- a/drivers/mtd/tests/stresstest.c +++ b/drivers/mtd/tests/stresstest.c @@ -87,7 +87,7 @@ static int do_read(void) { int eb = rand_eb(); int offs = rand_offs(); - int len = rand_len(offs), err; + int len = rand_len(offs); loff_t addr; if (bbt[eb + 1]) { @@ -97,13 +97,7 @@ static int do_read(void) len = mtd->erasesize - offs; } addr = eb * mtd->erasesize + offs; - err = mtdtest_read(mtd, addr, len, readbuf); - if (unlikely(err)) { - pr_err("error: read failed at 0x%llx\n", - (long long)addr); - return err; - } - return 0; + return mtdtest_read(mtd, addr, len, readbuf); } static int do_write(void) |