diff --git a/Kernel/Syscalls/mkdir.cpp b/Kernel/Syscalls/mkdir.cpp index b3b01a2004..2c7bd4665f 100644 --- a/Kernel/Syscalls/mkdir.cpp +++ b/Kernel/Syscalls/mkdir.cpp @@ -14,9 +14,7 @@ KResultOr Process::sys$mkdir(Userspace user_path, size_t p { VERIFY_PROCESS_BIG_LOCK_ACQUIRED(this) REQUIRE_PROMISE(cpath); - auto path = get_syscall_path_argument(user_path, path_length); - if (path.is_error()) - return path.error(); - return VirtualFileSystem::the().mkdir(path.value()->view(), mode & ~umask(), current_directory()); + auto path = TRY(get_syscall_path_argument(user_path, path_length)); + return VirtualFileSystem::the().mkdir(path->view(), mode & ~umask(), current_directory()); } }