aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/mtd/tests/mtd_test.c
diff options
context:
space:
mode:
authorAkinobu Mita <akinobu.mita@gmail.com>2013-08-15 22:55:08 +0900
committerDavid Woodhouse <David.Woodhouse@intel.com>2013-08-30 21:36:05 +0100
commitabc173ad84e50645f9136ea56afa9f86c98bf349 (patch)
treeab33103502169514f85a0a5013b015f5c3f1f3c0 /drivers/mtd/tests/mtd_test.c
parentmtd: nand: Allow to build pxa3xx_nand on Orion platforms (diff)
downloadlinux-dev-abc173ad84e50645f9136ea56afa9f86c98bf349.tar.xz
linux-dev-abc173ad84e50645f9136ea56afa9f86c98bf349.zip
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/mtd_test.c')
-rw-r--r--drivers/mtd/tests/mtd_test.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/mtd/tests/mtd_test.c b/drivers/mtd/tests/mtd_test.c
index bda8c4de3433..4c2e3f0bb953 100644
--- a/drivers/mtd/tests/mtd_test.c
+++ b/drivers/mtd/tests/mtd_test.c
@@ -92,6 +92,8 @@ int mtdtest_read(struct mtd_info *mtd, loff_t addr, size_t size, void *buf)
err = 0;
if (!err && read != size)
err = -EIO;
+ if (err)
+ pr_err("error: read failed at %#llx\n", addr);
return err;
}