summaryrefslogtreecommitdiffstats
path: root/drivers/mtd/tests/stresstest.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/mtd/tests/stresstest.c')
-rw-r--r--drivers/mtd/tests/stresstest.c10
1 files changed, 2 insertions, 8 deletions
diff --git a/drivers/mtd/tests/stresstest.c b/drivers/mtd/tests/stresstest.c
index 16952484540..6c9e23f40cb 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)