diff --git a/sys/kern/kern_descrip.c b/sys/kern/kern_descrip.c index 82ce56ddcaf3..4b4af296769a 100644 --- a/sys/kern/kern_descrip.c +++ b/sys/kern/kern_descrip.c @@ -2439,8 +2439,7 @@ _fget(struct thread *td, int fd, struct file **fpp, int flags, int error; *fpp = NULL; - if (td == NULL || (fdp = td->td_proc->p_fd) == NULL) - return (EBADF); + fdp = td->td_proc->p_fd; if (needrightsp != NULL) needrights = *needrightsp; else