diff --git a/Kernel/Syscalls/ptrace.cpp b/Kernel/Syscalls/ptrace.cpp index 0eede17a7c..2eb53c3b85 100644 --- a/Kernel/Syscalls/ptrace.cpp +++ b/Kernel/Syscalls/ptrace.cpp @@ -162,8 +162,7 @@ ErrorOr Process::sys$ptrace(Userspace REQUIRE_PROMISE(ptrace); auto params = TRY(copy_typed_from_user(user_params)); - auto result = handle_ptrace(params, *this); - return result.is_error() ? result.error().code() : result.value(); + return handle_ptrace(params, *this); } /**