aboutsummaryrefslogtreecommitdiff
path: root/sys/kern
diff options
context:
space:
mode:
Diffstat (limited to 'sys/kern')
-rw-r--r--sys/kern/kern_descrip.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/kern/kern_descrip.c b/sys/kern/kern_descrip.c
index 059e5123c7b5..43cedfe2199b 100644
--- a/sys/kern/kern_descrip.c
+++ b/sys/kern/kern_descrip.c
@@ -3214,7 +3214,7 @@ fget_only_user(struct filedesc *fdp, int fd, cap_rights_t *needrightsp,
haverights = cap_rights_fde_inline(fde);
error = cap_check_inline(haverights, needrightsp);
if (__predict_false(error != 0))
- return (EBADF);
+ return (error);
*fpp = fp;
return (0);
}