summaryrefslogtreecommitdiff
path: root/Kernel/Memory/MemoryManager.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'Kernel/Memory/MemoryManager.cpp')
-rw-r--r--Kernel/Memory/MemoryManager.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/Kernel/Memory/MemoryManager.cpp b/Kernel/Memory/MemoryManager.cpp
index c269f2a3a6..af01463512 100644
--- a/Kernel/Memory/MemoryManager.cpp
+++ b/Kernel/Memory/MemoryManager.cpp
@@ -730,8 +730,7 @@ KResultOr<NonnullOwnPtr<Region>> MemoryManager::allocate_kernel_region(PhysicalA
KResultOr<NonnullOwnPtr<Region>> MemoryManager::allocate_kernel_region_with_vmobject(VirtualRange const& range, VMObject& vmobject, StringView name, Region::Access access, Region::Cacheable cacheable)
{
auto region = TRY(Region::try_create_kernel_only(range, vmobject, 0, KString::try_create(name), access, cacheable));
- if (!region->map(kernel_page_directory()))
- return ENOMEM;
+ TRY(region->map(kernel_page_directory()));
return region;
}