summaryrefslogtreecommitdiff
path: root/Kernel/Bus
diff options
context:
space:
mode:
authorDaniel Bertalan <dani@danielbertalan.dev>2021-12-28 09:38:41 +0100
committerBrian Gianforcaro <b.gianfo@gmail.com>2021-12-28 01:55:22 -0800
commit52beeebe701d5633562cb7929cf1a39b7a05887f (patch)
tree275d896642d7949ff3feb2d21dc2d3b1219ca8c7 /Kernel/Bus
parent7d6058415e371561d9dbfa7b68081680a0a3e4c1 (diff)
downloadserenity-52beeebe701d5633562cb7929cf1a39b7a05887f.zip
Kernel: Remove the KString::try_create(String::formatted(...)) pattern
We can now directly create formatted KStrings with KString::formatted. :^)
Diffstat (limited to 'Kernel/Bus')
-rw-r--r--Kernel/Bus/PCI/SysFSPCI.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/Kernel/Bus/PCI/SysFSPCI.cpp b/Kernel/Bus/PCI/SysFSPCI.cpp
index dfcc7b52f2..1a61c854fc 100644
--- a/Kernel/Bus/PCI/SysFSPCI.cpp
+++ b/Kernel/Bus/PCI/SysFSPCI.cpp
@@ -16,7 +16,7 @@ namespace Kernel::PCI {
UNMAP_AFTER_INIT NonnullRefPtr<PCIDeviceSysFSDirectory> PCIDeviceSysFSDirectory::create(const SysFSDirectory& parent_directory, Address address)
{
// FIXME: Handle allocation failure gracefully
- auto device_name = MUST(KString::try_create(String::formatted("{:04x}:{:02x}:{:02x}.{}", address.domain(), address.bus(), address.device(), address.function())));
+ auto device_name = MUST(KString::formatted("{:04x}:{:02x}:{:02x}.{}", address.domain(), address.bus(), address.device(), address.function()));
return adopt_ref(*new (nothrow) PCIDeviceSysFSDirectory(move(device_name), parent_directory, address));
}