summaryrefslogtreecommitdiff
path: root/Kernel/Syscalls/statvfs.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'Kernel/Syscalls/statvfs.cpp')
-rw-r--r--Kernel/Syscalls/statvfs.cpp5
1 files changed, 1 insertions, 4 deletions
diff --git a/Kernel/Syscalls/statvfs.cpp b/Kernel/Syscalls/statvfs.cpp
index e9a91bc502..a530266c86 100644
--- a/Kernel/Syscalls/statvfs.cpp
+++ b/Kernel/Syscalls/statvfs.cpp
@@ -76,10 +76,7 @@ KResultOr<FlatPtr> Process::sys$fstatvfs(int fd, statvfs* buf)
VERIFY_PROCESS_BIG_LOCK_ACQUIRED(this)
REQUIRE_PROMISE(stdio);
- auto description = fds().file_description(fd);
- if (!description)
- return EBADF;
-
+ auto description = TRY(fds().file_description(fd));
return do_statvfs(description->absolute_path(), buf);
}