!192 format函数错误分支未释放锁

Merge pull request !192 from Far/fatfs
This commit is contained in:
openharmony_ci 2021-04-29 09:57:58 +08:00 committed by Gitee
commit 67f9f7506c
1 changed files with 1 additions and 0 deletions

View File

@ -78,6 +78,7 @@ int format(const char *dev, int sectors, int option)
}
err = fatfs_mkfs(device, sectors, option);
if (err < 0) {
VnodeDrop();
set_errno(-err);
return -1;
}