summaryrefslogtreecommitdiff
path: root/Kernel/Devices/KCOVDevice.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'Kernel/Devices/KCOVDevice.cpp')
-rw-r--r--Kernel/Devices/KCOVDevice.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/Kernel/Devices/KCOVDevice.cpp b/Kernel/Devices/KCOVDevice.cpp
index 712d5df7b9..0d3dc59674 100644
--- a/Kernel/Devices/KCOVDevice.cpp
+++ b/Kernel/Devices/KCOVDevice.cpp
@@ -20,7 +20,10 @@ HashMap<ThreadID, KCOVInstance*>* KCOVDevice::thread_instance;
UNMAP_AFTER_INIT NonnullRefPtr<KCOVDevice> KCOVDevice::must_create()
{
- return adopt_ref(*new KCOVDevice);
+ auto kcov_device_or_error = try_create_device<KCOVDevice>();
+ // FIXME: Find a way to propagate errors
+ VERIFY(!kcov_device_or_error.is_error());
+ return kcov_device_or_error.release_value();
}
UNMAP_AFTER_INIT KCOVDevice::KCOVDevice()