9
0
Fork 0

mtd nand omap: fail on bch decode failure

The driver used to print an error when bch decoing failed, but
did not actually throw an error. Fix this.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
This commit is contained in:
Sascha Hauer 2011-11-07 18:11:11 +01:00
parent 4cb1b120bf
commit 02fa86e9bc
1 changed files with 4 additions and 1 deletions

View File

@ -377,8 +377,11 @@ static int omap_correct_bch(struct mtd_info *mtd, uint8_t *dat,
}
count = 0;
if (eccflag == 1)
if (eccflag == 1) {
count = decode_bch(select_4_8, calc_ecc, err_loc);
if (count < 0)
return count;
}
for (j = 0; j < count; j++) {
if (err_loc[j] < 4096)