diff --git a/drivers/block/disk/src/disk.c b/drivers/block/disk/src/disk.c index 756d3cc1..6c9681c6 100644 --- a/drivers/block/disk/src/disk.c +++ b/drivers/block/disk/src/disk.c @@ -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) {