diff --git a/Kernel/Syscalls/access.cpp b/Kernel/Syscalls/access.cpp index 267231a6d0..2e2c27d71c 100644 --- a/Kernel/Syscalls/access.cpp +++ b/Kernel/Syscalls/access.cpp @@ -14,10 +14,8 @@ KResultOr Process::sys$access(Userspace user_path, size_t { VERIFY_PROCESS_BIG_LOCK_ACQUIRED(this); REQUIRE_PROMISE(rpath); - auto path = get_syscall_path_argument(user_path, path_length); - if (path.is_error()) - return path.error(); - return VirtualFileSystem::the().access(path.value()->view(), mode, current_directory()); + auto path = TRY(get_syscall_path_argument(user_path, path_length)); + return VirtualFileSystem::the().access(path->view(), mode, current_directory()); } }