aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChuanhong Guo <gch981213@gmail.com>2022-04-07 09:56:02 +0800
committerChuanhong Guo <gch981213@gmail.com>2022-04-09 21:08:26 +0800
commit6fa50e26e7c1221085d8e71cde7e9148c540c752 (patch)
treeccdcce2086583ae17da42098b602f5e7ed45e4ea
parent55be011a71a4499311e1b64a6c8797d32c949b9e (diff)
downloadupstream-6fa50e26e7c1221085d8e71cde7e9148c540c752.tar.gz
upstream-6fa50e26e7c1221085d8e71cde7e9148c540c752.tar.bz2
upstream-6fa50e26e7c1221085d8e71cde7e9148c540c752.zip
kernel: mtk_bmt: skip bitflip check if threshold isn't set
kernel spi-nand driver leaves this field empty and let mtd set it later. Signed-off-by: Chuanhong Guo <gch981213@gmail.com>
-rw-r--r--target/linux/generic/files/drivers/mtd/nand/mtk_bmt.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/target/linux/generic/files/drivers/mtd/nand/mtk_bmt.c b/target/linux/generic/files/drivers/mtd/nand/mtk_bmt.c
index f1df4a11f1..bcff7d6ac8 100644
--- a/target/linux/generic/files/drivers/mtd/nand/mtk_bmt.c
+++ b/target/linux/generic/files/drivers/mtd/nand/mtk_bmt.c
@@ -146,7 +146,7 @@ mtk_bmt_read(struct mtd_info *mtd, loff_t from,
goto out;
}
- if (cur_ret >= mtd->bitflip_threshold)
+ if (mtd->bitflip_threshold && cur_ret >= mtd->bitflip_threshold)
mtk_bmt_remap_block(block, cur_block, mtd->erasesize);
ops->retlen += cur_ops.retlen;