diff --git a/Kernel/Process.cpp b/Kernel/Process.cpp index c7dc4ad184..045d769928 100644 --- a/Kernel/Process.cpp +++ b/Kernel/Process.cpp @@ -544,10 +544,7 @@ KResultOr> Process::get_syscall_path_argument(Userspace PATH_MAX) return ENAMETOOLONG; - auto string_or_error = try_copy_kstring_from_user(user_path, path_length); - if (string_or_error.is_error()) - return string_or_error.error(); - return string_or_error.release_value(); + return try_copy_kstring_from_user(user_path, path_length); } KResultOr> Process::get_syscall_path_argument(Syscall::StringArgument const& path) const