mtd: mtd_nandecctest: make module_init() return appropriate errno
authorAkinobu Mita <akinobu.mita@gmail.com>
Mon, 3 Sep 2012 12:59:59 +0000 (21:59 +0900)
committerDavid Woodhouse <David.Woodhouse@intel.com>
Sat, 29 Sep 2012 14:34:25 +0000 (15:34 +0100)
Return -EINVAL instead of -1 (-EPERM) when test fails.

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>
drivers/mtd/tests/mtd_nandecctest.c

index 1051b4814daac55b2563f081f20ae2b42832c6c0..128547c5bd550d76a0340c165e4a1cbea4f25882 100644 (file)
@@ -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