mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-22 23:50:19 +00:00
Kernel: Use TRY() in sys$map_time_page()
This commit is contained in:
parent
d53c60fd9f
commit
6dddd500bf
Notes:
sideshowbarker
2024-07-18 04:41:21 +09:00
Author: https://github.com/awesomekling Commit: https://github.com/SerenityOS/serenity/commit/6dddd500bf9
1 changed files with 2 additions and 5 deletions
|
@ -21,11 +21,8 @@ KResultOr<FlatPtr> Process::sys$map_time_page()
|
|||
if (!range.has_value())
|
||||
return ENOMEM;
|
||||
|
||||
auto region_or_error = address_space().allocate_region_with_vmobject(range.value(), vmobject, 0, "Kernel time page"sv, PROT_READ, true);
|
||||
if (region_or_error.is_error())
|
||||
return region_or_error.error();
|
||||
|
||||
return region_or_error.value()->vaddr().get();
|
||||
auto* region = TRY(address_space().allocate_region_with_vmobject(range.value(), vmobject, 0, "Kernel time page"sv, PROT_READ, true));
|
||||
return region->vaddr().get();
|
||||
}
|
||||
|
||||
KResultOr<FlatPtr> Process::sys$clock_gettime(clockid_t clock_id, Userspace<timespec*> user_ts)
|
||||
|
|
Loading…
Reference in a new issue