Patchwork [v3,04/11] mtd: mtd_nandecctest: make module_init() return appropriate errno

login
register
mail settings
Submitter Akinobu Mita
Date Sept. 3, 2012, 12:59 p.m.
Message ID <1346677206-13621-5-git-send-email-akinobu.mita@gmail.com>
Download mbox | patch
Permalink /patch/181353/
State Accepted
Commit bb82477ebede3d0c37a502a899b68eb45fefca4f
Headers show

Comments

Akinobu Mita - Sept. 3, 2012, 12:59 p.m.
Return -EINVAL instead of -1 (-EPERM) when test fails.

Signed-off-by: Akinobu Mita <akinobu.mita@gmail.com>
Cc: David Woodhouse <dwmw2@infradead.org>
Cc: linux-mtd@lists.infradead.org
Cc: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
---
 drivers/mtd/tests/mtd_nandecctest.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Patch

diff --git a/drivers/mtd/tests/mtd_nandecctest.c b/drivers/mtd/tests/mtd_nandecctest.c
index 1051b48..128547c 100644
--- a/drivers/mtd/tests/mtd_nandecctest.c
+++ b/drivers/mtd/tests/mtd_nandecctest.c
@@ -51,7 +51,7 @@  static int nand_ecc_test(const size_t size)
 	print_hex_dump(KERN_DEBUG, "", DUMP_PREFIX_OFFSET, 16, 4,
 			error_data, size, false);
 
-	return -1;
+	return -EINVAL;
 }
 
 #else