summaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
Diffstat (limited to 'sys')
-rw-r--r--sys/kern/kern_filedesc.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/sys/kern/kern_filedesc.c b/sys/kern/kern_filedesc.c
index 4eab0ae..3401f0b 100644
--- a/sys/kern/kern_filedesc.c
+++ b/sys/kern/kern_filedesc.c
@@ -324,12 +324,11 @@ read(int fd, void *buf, size_t count)
};
fd_desc = fd_from_fdnum(this_td(), fd);
- sio.offset = fd_desc->offset;
-
if (fd_desc == NULL) {
return -EBADF;
}
+ sio.offset = fd_desc->offset;
vnode = fd_desc->vnode;
if (count > MAX_RW_SIZE) {