summaryrefslogtreecommitdiffstats
path: root/sys/fs/procfs
diff options
context:
space:
mode:
Diffstat (limited to 'sys/fs/procfs')
-rw-r--r--sys/fs/procfs/procfs_vnops.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/sys/fs/procfs/procfs_vnops.c b/sys/fs/procfs/procfs_vnops.c
index 0619a68..e952318 100644
--- a/sys/fs/procfs/procfs_vnops.c
+++ b/sys/fs/procfs/procfs_vnops.c
@@ -239,11 +239,8 @@ procfs_ioctl(ap)
return ENOTTY;
}
- if ((error = p_can(p, procp, P_CAN_DEBUG, NULL))) {
- if (error == ESRCH)
- error = ENOENT;
- return (error);
- }
+ if ((error = p_can(p, procp, P_CAN_DEBUG, NULL)))
+ return (error == ESRCH ? ENOENT : error);
switch (ap->a_command) {
case PIOCBIS:
OpenPOWER on IntegriCloud