!368 fix: Identical condition 'ret<0', second condition is always false. 🐛
Merge pull request !368 from Joker2770/master
This commit is contained in:
commit
f4626985fd
|
@ -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) {
|
||||
|
|
Loading…
Reference in New Issue