Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit f45c2990 authored by Akinobu Mita's avatar Akinobu Mita Committed by David Woodhouse
Browse files

mtd: mtd_nandecctest: make module_init() return an error code if test fails



Return an error code if test fails in order to detect a test case failure
by invoking tests repeatedly like this:

while sudo modprobe mtd_nandecctest; do
	sudo modprobe -r mtd_nandecctest
done

Signed-off-by: default avatarAkinobu Mita <akinobu.mita@gmail.com>
Signed-off-by: default avatarArtem Bityutskiy <artem.bityutskiy@linux.intel.com>
Signed-off-by: default avatarDavid Woodhouse <David.Woodhouse@intel.com>
parent 0ce0060f
Loading
Loading
Loading
Loading
+6 −3
Original line number Diff line number Diff line
@@ -66,10 +66,13 @@ static int nand_ecc_test(const size_t size)

static int __init ecc_test_init(void)
{
	nand_ecc_test(256);
	nand_ecc_test(512);
	int err;

	return 0;
	err = nand_ecc_test(256);
	if (err)
		return err;

	return nand_ecc_test(512);
}

static void __exit ecc_test_exit(void)