提交 13488098 编写于 作者: J Joker2770

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

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