summaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorBrian Norris <computersforpeace@gmail.com>2015-05-04 20:43:31 +0200
committerBrian Norris <computersforpeace@gmail.com>2015-05-14 18:56:31 +0200
commitdb7c727402b3f6a604f0c52be5f6df8ca3797030 (patch)
treea55fa9b3ea2a3da12428dfbfb4d1cd8dd693520d /drivers
parentLinux 4.1-rc1 (diff)
downloadlinux-db7c727402b3f6a604f0c52be5f6df8ca3797030.tar.xz
linux-db7c727402b3f6a604f0c52be5f6df8ca3797030.zip
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')
-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)