diff options
author | Chuanhong Guo <gch981213@gmail.com> | 2022-04-07 09:56:02 +0800 |
---|---|---|
committer | Felix Fietkau <nbd@nbd.name> | 2022-10-10 12:58:41 +0200 |
commit | 329b1543f3902885488c85ce3c679b0028992b47 (patch) | |
tree | adaa9a03997a4c5a9964665624ea2928155ac64a /target/linux/generic/files/drivers | |
parent | 42c8610efc56333be3cb829799d00b7bd684b82c (diff) | |
download | upstream-329b1543f3902885488c85ce3c679b0028992b47.tar.gz upstream-329b1543f3902885488c85ce3c679b0028992b47.tar.bz2 upstream-329b1543f3902885488c85ce3c679b0028992b47.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>
(cherry-picked from commit 6fa50e26e7c1221085d8e71cde7e9148c540c752)
Diffstat (limited to 'target/linux/generic/files/drivers')
-rw-r--r-- | target/linux/generic/files/drivers/mtd/nand/mtk_bmt.c | 2 |
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; |