diff options
author | Akinobu Mita <akinobu.mita@gmail.com> | 2013-08-15 15:55:09 +0200 |
---|---|---|
committer | David Woodhouse <David.Woodhouse@intel.com> | 2013-08-30 22:36:06 +0200 |
commit | 8a9f4aa3ac7560efcb242b3d1a31b1d804106f12 (patch) | |
tree | ac105da51b1987e3b6894fb6b1bd73a6765c3ca3 /drivers/mtd/tests/mtd_test.c | |
parent | mtd: tests: incorporate error message for mtdtest_read() (diff) | |
download | linux-8a9f4aa3ac7560efcb242b3d1a31b1d804106f12.tar.xz linux-8a9f4aa3ac7560efcb242b3d1a31b1d804106f12.zip |
mtd: tests: incorporate error message for mtdtest_write()
All callers of mtdtest_write() print the same error message on failure.
This incorporates the error message to mtdtest_write() 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 4c2e3f0bb953..c818a63532e7 100644 --- a/drivers/mtd/tests/mtd_test.c +++ b/drivers/mtd/tests/mtd_test.c @@ -107,6 +107,8 @@ int mtdtest_write(struct mtd_info *mtd, loff_t addr, size_t size, err = mtd_write(mtd, addr, size, &written, buf); if (!err && written != size) err = -EIO; + if (err) + pr_err("error: write failed at %#llx\n", addr); return err; } |