diff options
author | Akinobu Mita <akinobu.mita@gmail.com> | 2013-08-15 09:55:08 -0400 |
---|---|---|
committer | David Woodhouse <David.Woodhouse@intel.com> | 2013-08-30 16:36:05 -0400 |
commit | abc173ad84e50645f9136ea56afa9f86c98bf349 (patch) | |
tree | ab33103502169514f85a0a5013b015f5c3f1f3c0 /drivers/mtd/tests/mtd_test.c | |
parent | 0d58f6ee0106256c47db9640141469d1ed80819a (diff) |
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.c | 2 |
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) | |||
92 | err = 0; | 92 | err = 0; |
93 | if (!err && read != size) | 93 | if (!err && read != size) |
94 | err = -EIO; | 94 | err = -EIO; |
95 | if (err) | ||
96 | pr_err("error: read failed at %#llx\n", addr); | ||
95 | 97 | ||
96 | return err; | 98 | return err; |
97 | } | 99 | } |