summaryrefslogtreecommitdiffstats
path: root/drivers/mtd/tests
diff options
context:
space:
mode:
authorBrian Norris <computersforpeace@gmail.com>2015-05-04 11:43:31 -0700
committerBrian Norris <computersforpeace@gmail.com>2015-05-14 09:56:31 -0700
commitdb7c727402b3f6a604f0c52be5f6df8ca3797030 (patch)
treea55fa9b3ea2a3da12428dfbfb4d1cd8dd693520d /drivers/mtd/tests
parentb787f68c36d49bb1d9236f403813641efa74a031 (diff)
downloadlinux-db7c727402b3f6a604f0c52be5f6df8ca3797030.tar.bz2
mtd: readtest: don't clobber error reports
Commit 2a6a28e7922c ("mtd: Make MTD tests cancelable") accidentally clobbered any read failure reports. Coverity CID #1296020 Signed-off-by: Brian Norris <computersforpeace@gmail.com>
Diffstat (limited to 'drivers/mtd/tests')
-rw-r--r--drivers/mtd/tests/readtest.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/mtd/tests/readtest.c b/drivers/mtd/tests/readtest.c
index a3196b750a22..58df07acdbdb 100644
--- a/drivers/mtd/tests/readtest.c
+++ b/drivers/mtd/tests/readtest.c
@@ -191,9 +191,11 @@ static int __init mtd_readtest_init(void)
err = ret;
}
- err = mtdtest_relax();
- if (err)
+ ret = mtdtest_relax();
+ if (ret) {
+ err = ret;
goto out;
+ }
}
if (err)