mtd: nand: Remove bbt option property if scan fail

Change-Id: Ifb5b500b6ffee551aea5b6aecea629b3d0ea6207
Signed-off-by: Jon Lin <jon.lin@rock-chips.com>
This commit is contained in:
Jon Lin 2020-06-28 20:13:39 +08:00 committed by Jianhong Chen
parent f0f5bdc29d
commit 78cac1dffd
1 changed files with 3 additions and 1 deletions

View File

@ -216,9 +216,11 @@ static int nanddev_scan_bbt(struct nand_device *nand)
if (nand->bbt.version == 0) {
nanddev_bbt_format(nand);
ret = nanddev_bbt_update(nand);
if (ret)
if (ret) {
nand->bbt.option = 0;
pr_err("%s fail\n", __func__);
}
}
#endif
return ret;