summaryrefslogtreecommitdiff
path: root/Kernel/Devices/ZeroDevice.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'Kernel/Devices/ZeroDevice.cpp')
-rw-r--r--Kernel/Devices/ZeroDevice.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/Kernel/Devices/ZeroDevice.cpp b/Kernel/Devices/ZeroDevice.cpp
index 880db84502..fad3113f1a 100644
--- a/Kernel/Devices/ZeroDevice.cpp
+++ b/Kernel/Devices/ZeroDevice.cpp
@@ -12,7 +12,10 @@ namespace Kernel {
UNMAP_AFTER_INIT NonnullRefPtr<ZeroDevice> ZeroDevice::must_create()
{
- return adopt_ref(*new ZeroDevice);
+ auto zero_device_or_error = try_create_device<ZeroDevice>();
+ // FIXME: Find a way to propagate errors
+ VERIFY(!zero_device_or_error.is_error());
+ return zero_device_or_error.release_value();
}
UNMAP_AFTER_INIT ZeroDevice::ZeroDevice()