Commit c57753d4 authored by Jorge Ramirez-Ortiz's avatar Jorge Ramirez-Ortiz Committed by Brian Norris

mtd: nand: tests: fix regression introduced in mtd_nandectest

Offending Commit: 6e941192 "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: default avatarJorge Ramirez-Ortiz <jorge.ramirez-ortiz@linaro.org>
Reviewed-by: default avatarBoris Brezillon <boris.brezillon@free-electrons.com>
Tested-by: default avatarFranklin S Cooper Jr <fcooper@ti.com>
Signed-off-by: default avatarBrian Norris <computersforpeace@gmail.com>
parent 44248aff
...@@ -187,7 +187,7 @@ static int double_bit_error_detect(void *error_data, void *error_ecc, ...@@ -187,7 +187,7 @@ static int double_bit_error_detect(void *error_data, void *error_ecc,
__nand_calculate_ecc(error_data, size, calc_ecc); __nand_calculate_ecc(error_data, size, calc_ecc);
ret = __nand_correct_data(error_data, error_ecc, calc_ecc, size); 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[] = { static const struct nand_ecc_test nand_ecc_test[] = {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment