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:
Akinobu Mita
2013-08-15 22:55:09 +09:00
committed by David Woodhouse
parent abc173ad84
commit 8a9f4aa3ac
5 changed files with 12 additions and 50 deletions

View File

@@ -102,16 +102,10 @@ static uint8_t hash(unsigned offset)
/* 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. */