summaryrefslogtreecommitdiff
path: root/Kernel/Time/HPET.cpp
diff options
context:
space:
mode:
authorAndreas Kling <kling@serenityos.org>2021-09-06 01:36:14 +0200
committerAndreas Kling <kling@serenityos.org>2021-09-06 01:55:27 +0200
commit75564b4a5f2b5452163571116ee9efaf5c3c65af (patch)
treeec672e92fcf3e7dca6ed51bce1c287319a9fc77d /Kernel/Time/HPET.cpp
parentcb71a7370836c3b70038e2f718ee87f6fc286229 (diff)
downloadserenity-75564b4a5f2b5452163571116ee9efaf5c3c65af.zip
Kernel: Make kernel region allocators return KResultOr<NOP<Region>>
This expands the reach of error propagation greatly throughout the kernel. Sadly, it also exposes the fact that we're allocating (and doing other fallible things) in constructors all over the place. This patch doesn't attempt to address that of course. That's work for our future selves.
Diffstat (limited to 'Kernel/Time/HPET.cpp')
-rw-r--r--Kernel/Time/HPET.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/Kernel/Time/HPET.cpp b/Kernel/Time/HPET.cpp
index ee6d8e75cd..7014033e83 100644
--- a/Kernel/Time/HPET.cpp
+++ b/Kernel/Time/HPET.cpp
@@ -413,7 +413,7 @@ u64 HPET::ns_to_raw_counter_ticks(u64 ns) const
UNMAP_AFTER_INIT HPET::HPET(PhysicalAddress acpi_hpet)
: m_physical_acpi_hpet_table(acpi_hpet)
, m_physical_acpi_hpet_registers(find_acpi_hpet_registers_block())
- , m_hpet_mmio_region(MM.allocate_kernel_region(m_physical_acpi_hpet_registers.page_base(), PAGE_SIZE, "HPET MMIO", Memory::Region::Access::ReadWrite))
+ , m_hpet_mmio_region(MM.allocate_kernel_region(m_physical_acpi_hpet_registers.page_base(), PAGE_SIZE, "HPET MMIO", Memory::Region::Access::ReadWrite).release_value())
{
s_hpet = this; // Make available as soon as possible so that IRQs can use it