1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 14:28:12 +00:00

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

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);