fix: Identical condition 'ret<0', second condition is always false. 🐛
Signed-off-by: Joker2770 <1214220480@qq.com>
This commit is contained in:
parent
eb72f78cf1
commit
1348809807
|
@ -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) {
|
||||||
|
|
Loading…
Reference in New Issue