Skip to content

Commit

Permalink
mtd: nand: tests: fix regression introduced in mtd_nandectest
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Jorge Ramirez-Ortiz authored and Brian Norris committed Mar 5, 2016
1 parent 44248af commit c57753d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/mtd/tests/mtd_nandecctest.c
Original file line number Diff line number Diff line change
Expand Up @@ -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[] = {
Expand Down

0 comments on commit c57753d

Please sign in to comment.