mtd: nand: tests: fix regression introduced in mtd_nandectest

Linux-MTD Mailing List linux-mtd at lists.infradead.org
Fri Mar 4 17:59:01 PST 2016


Gitweb:     http://git.infradead.org/?p=mtd-2.6.git;a=commit;h=c57753d4541d5104284abbdceb841e690394e55f
Commit:     c57753d4541d5104284abbdceb841e690394e55f
Parent:     44248affb5d82d32cdb58a92a94ce191d4ddee60
Author:     Jorge Ramirez-Ortiz <jorge.ramirez-ortiz at linaro.org>
AuthorDate: Tue Mar 1 16:04:00 2016 -0500
Committer:  Brian Norris <computersforpeace at gmail.com>
CommitDate: Fri Mar 4 16:59:20 2016 -0800

    mtd: nand: tests: fix regression introduced in mtd_nandectest
    
    Offending Commit: 6e94119 "mtd: nand: return consistent error codes in
    ecc.correct() implementations"
    
    The new error code was not being handled properly in double bit error
    detection.
    
    Signed-off-by: Jorge Ramirez-Ortiz <jorge.ramirez-ortiz at linaro.org>
    Reviewed-by: Boris Brezillon <boris.brezillon at free-electrons.com>
    Tested-by: Franklin S Cooper Jr <fcooper at ti.com>
    Signed-off-by: Brian Norris <computersforpeace at gmail.com>
---
 drivers/mtd/tests/mtd_nandecctest.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/mtd/tests/mtd_nandecctest.c b/drivers/mtd/tests/mtd_nandecctest.c
index 7931615..88b6c81 100644
--- a/drivers/mtd/tests/mtd_nandecctest.c
+++ b/drivers/mtd/tests/mtd_nandecctest.c
@@ -187,7 +187,7 @@ static int double_bit_error_detect(void *error_data, void *error_ecc,
 	__nand_calculate_ecc(error_data, size, calc_ecc);
 	ret = __nand_correct_data(error_data, error_ecc, calc_ecc, size);
 
-	return (ret == -1) ? 0 : -EINVAL;
+	return (ret == -EBADMSG) ? 0 : -EINVAL;
 }
 
 static const struct nand_ecc_test nand_ecc_test[] = {



More information about the linux-mtd-cvs mailing list