Kernel: Use KResultOr::release_value in Process::create_kernel_thread

This should avoid an unneccessary reference bump.
This commit is contained in:
Tom 2021-02-07 14:13:30 -07:00 committed by Andreas Kling
parent f74e31c74d
commit b22740c08e
Notes: sideshowbarker 2024-07-18 22:31:48 +09:00

View File

@ -811,7 +811,7 @@ RefPtr<Thread> Process::create_kernel_thread(void (*entry)(void*), void* entry_d
if (thread_or_error.is_error())
return {};
auto& thread = thread_or_error.value();
auto thread = thread_or_error.release_value();
thread->set_name(name);
thread->set_affinity(affinity);
thread->set_priority(priority);