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 <[email protected]>
Reviewed-by: Boris Brezillon <[email protected]>
Tested-by: Franklin S Cooper Jr <[email protected]>
Signed-off-by: Brian Norris <[email protected]>
This commit is contained in:
Jorge Ramirez-Ortiz 2016-03-01 16:04:00 -05:00 • committed by Brian Norris
commit c57753d454

View file

@ -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[] = {