drivers: rkflash: Remove bbt option property if scan fail

Change-Id: Ice861d20077152174d4d407a40239a9142cf3355
Signed-off-by: Jon Lin <jon.lin@rock-chips.com>
This commit is contained in:
Jon Lin
2020-06-28 20:15:39 +08:00
committed by Tao Huang
parent cee61f3e32
commit 082cbe0f6d

View File

@@ -207,8 +207,10 @@ static int nanddev_scan_bbt(struct snand_mtd_dev *nand)
if (nand->bbt.version == 0) {
nanddev_bbt_format(nand);
ret = snanddev_bbt_update(nand);
if (ret)
if (ret) {
nand->bbt.option = 0;
pr_err("%s fail\n", __func__);
}
}
return 0;