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>
diff --git a/drivers/mtd/tests/nandbiterrs.c b/drivers/mtd/tests/nandbiterrs.c
index 5a8c858..3cd3aab 100644
--- a/drivers/mtd/tests/nandbiterrs.c
+++ b/drivers/mtd/tests/nandbiterrs.c
@@ -102,16 +102,10 @@
/* Writes wbuffer to page */
static int write_page(int log)
{
- int err;
-
if (log)
pr_info("write_page\n");
- err = mtdtest_write(mtd, offset, mtd->writesize, wbuffer);
- if (err)
- pr_err("error: write failed at %#llx\n", (long long)offset);
-
- return err;
+ return mtdtest_write(mtd, offset, mtd->writesize, wbuffer);
}
/* Re-writes the data area while leaving the OOB alone. */