summaryrefslogtreecommitdiff
path: root/Kernel/Syscalls/ioctl.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'Kernel/Syscalls/ioctl.cpp')
-rw-r--r--Kernel/Syscalls/ioctl.cpp4
1 files changed, 1 insertions, 3 deletions
diff --git a/Kernel/Syscalls/ioctl.cpp b/Kernel/Syscalls/ioctl.cpp
index 5a2b740b08..9f9582d6e1 100644
--- a/Kernel/Syscalls/ioctl.cpp
+++ b/Kernel/Syscalls/ioctl.cpp
@@ -13,9 +13,7 @@ namespace Kernel {
KResultOr<FlatPtr> Process::sys$ioctl(int fd, unsigned request, FlatPtr arg)
{
VERIFY_PROCESS_BIG_LOCK_ACQUIRED(this)
- auto description = fds().file_description(fd);
- if (!description)
- return EBADF;
+ auto description = TRY(fds().file_description(fd));
if (request == FIONBIO) {
description->set_blocking(arg == 0);
return KSuccess;