mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/netdev/net.git/
synced 2026-04-27 03:58:31 -04:00
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>
This commit is contained in:
committed by
David Woodhouse
parent
abc173ad84
commit
8a9f4aa3ac
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user