summaryrefslogtreecommitdiff
path: root/Kernel/Storage
diff options
context:
space:
mode:
authorIdan Horowitz <idan.horowitz@gmail.com>2022-01-11 22:32:20 +0200
committerIdan Horowitz <idan.horowitz@gmail.com>2022-01-12 16:09:09 +0200
commit4b74f2e3ecc89a57a56bfbcc907126db7f4ee78d (patch)
treef165c596ed82f1ca9c480efb6457934c066ed3dc /Kernel/Storage
parentc92753a686a31cefde7058c388bc7eb081be28e4 (diff)
downloadserenity-4b74f2e3ecc89a57a56bfbcc907126db7f4ee78d.zip
Kernel: Convert NVMeNameSpace::try_create() to KString
Diffstat (limited to 'Kernel/Storage')
-rw-r--r--Kernel/Storage/NVMe/NVMeNameSpace.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/Kernel/Storage/NVMe/NVMeNameSpace.cpp b/Kernel/Storage/NVMe/NVMeNameSpace.cpp
index 7df86434ae..77a8b70e5f 100644
--- a/Kernel/Storage/NVMe/NVMeNameSpace.cpp
+++ b/Kernel/Storage/NVMe/NVMeNameSpace.cpp
@@ -16,8 +16,7 @@ ErrorOr<NonnullRefPtr<NVMeNameSpace>> NVMeNameSpace::try_create(NonnullRefPtrVec
{
auto minor_number = StorageManagement::generate_storage_minor_number();
auto major_number = StorageManagement::storage_type_major_number();
- auto device_name = String::formatted("nvme{:d}n{:d}", controller_id, nsid);
- auto device_name_kstring = KString::must_create(device_name.view());
+ auto device_name_kstring = TRY(KString::formatted("nvme{:d}n{:d}", controller_id, nsid));
auto device = TRY(DeviceManagement::try_create_device<NVMeNameSpace>(queues, storage_size, lba_size, major_number.value(), minor_number.value(), nsid, move(device_name_kstring)));
return device;