Skip to content

Commit c57753d

Browse files
ldtscomputersforpeace
authored andcommitted
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@linaro.org> Reviewed-by: Boris Brezillon <boris.brezillon@free-electrons.com> Tested-by: Franklin S Cooper Jr <fcooper@ti.com> Signed-off-by: Brian Norris <computersforpeace@gmail.com>
1 parent 44248af commit c57753d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/mtd/tests/mtd_nandecctest.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -187,7 +187,7 @@ static int double_bit_error_detect(void *error_data, void *error_ecc,
187187
__nand_calculate_ecc(error_data, size, calc_ecc);
188188
ret = __nand_correct_data(error_data, error_ecc, calc_ecc, size);
189189

190-
return (ret == -1) ? 0 : -EINVAL;
190+
return (ret == -EBADMSG) ? 0 : -EINVAL;
191191
}
192192

193193
static const struct nand_ecc_test nand_ecc_test[] = {

0 commit comments

Comments
 (0)