diff --git a/drivers/block/disk/src/disk.c b/drivers/block/disk/src/disk.c index 756d3cc1deadfac2f875636365bf0ef8d4715cc0..6c9681c6808f7e9a8630492b3cfe3e4989fe8b2c 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) {