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, }; + int ret; - return bmtd._read_oob(bmtd.mtd, page << bmtd.pg_shift, &ops); + 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)