diff options
Diffstat (limited to 'Kernel')
-rw-r--r-- | Kernel/Memory/AddressSpace.cpp | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/Kernel/Memory/AddressSpace.cpp b/Kernel/Memory/AddressSpace.cpp index 6f3e54d313..d936be2b40 100644 --- a/Kernel/Memory/AddressSpace.cpp +++ b/Kernel/Memory/AddressSpace.cpp @@ -267,8 +267,7 @@ ErrorOr<Region*> AddressSpace::add_region(NonnullOwnPtr<Region> region) { auto* ptr = region.ptr(); SpinlockLocker lock(m_lock); - if (!m_regions.try_insert(region->vaddr().get(), move(region))) - return ENOMEM; + TRY(m_regions.try_insert(region->vaddr().get(), move(region))); return ptr; } |