提交 f4626985 编写于 作者: O openharmony_ci 提交者: Gitee

!368 fix: Identical condition 'ret<0', second condition is always false. 🐛

Merge pull request !368 from Joker2770/master
...@@ -328,11 +328,7 @@ static INT32 DiskAddPart(los_disk *disk, UINT64 sectorStart, UINT64 sectorCount, ...@@ -328,11 +328,7 @@ static INT32 DiskAddPart(los_disk *disk, UINT64 sectorStart, UINT64 sectorCount,
VnodeHold(); VnodeHold();
VnodeLookup(devName, &partDev, 0); VnodeLookup(devName, &partDev, 0);
if (ret < 0) {
VnodeDrop();
PRINT_ERR("DiskAddPart : find %s fail!\n", devName);
return VFS_ERROR;
}
part = DiskPartAllocate(partDev, sectorStart, sectorCount); part = DiskPartAllocate(partDev, sectorStart, sectorCount);
VnodeDrop(); VnodeDrop();
if (part == NULL) { if (part == NULL) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册