diff options
Diffstat (limited to 'target/linux/generic/files')
-rw-r--r-- | target/linux/generic/files/drivers/mtd/nand/mtk_bmt.h | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/target/linux/generic/files/drivers/mtd/nand/mtk_bmt.h b/target/linux/generic/files/drivers/mtd/nand/mtk_bmt.h index dff1f28c81..517ff7414f 100644 --- a/target/linux/generic/files/drivers/mtd/nand/mtk_bmt.h +++ b/target/linux/generic/files/drivers/mtd/nand/mtk_bmt.h @@ -95,8 +95,14 @@ bbt_nand_read(u32 page, unsigned char *dat, int dat_len, .datbuf = dat, .len = dat_len, }; - - return bmtd._read_oob(bmtd.mtd, page << bmtd.pg_shift, &ops); + int ret; + + ret = bmtd._read_oob(bmtd.mtd, page << bmtd.pg_shift, &ops); + if (ret < 0) + return ret; + if (ret) + pr_info("%s: %d bitflips\n", __func__, ret); + return 0; } static inline int bbt_nand_erase(u16 block) |