aboutsummaryrefslogtreecommitdiff
path: root/sys/kern/tty_pts.c
diff options
context:
space:
mode:
authorEd Schouten <ed@FreeBSD.org>2008-11-04 10:58:02 +0000
committerEd Schouten <ed@FreeBSD.org>2008-11-04 10:58:02 +0000
commit394e94079c8814e5383a8256f9538c7de836db61 (patch)
treecaed97d21b26565f61af02fdd79397a5b5cc74a2 /sys/kern/tty_pts.c
parentc63c25015a91ab6a437e378e094593f94290c0bb (diff)
downloadsrc-394e94079c8814e5383a8256f9538c7de836db61.tar.gz
src-394e94079c8814e5383a8256f9538c7de836db61.zip
Remove redundant return value tests.
There is no need to test whether the return value is non-zero here. Just return the error number directly.
Notes
Notes: svn path=/head/; revision=184621
Diffstat (limited to 'sys/kern/tty_pts.c')
-rw-r--r--sys/kern/tty_pts.c7
1 files changed, 1 insertions, 6 deletions
diff --git a/sys/kern/tty_pts.c b/sys/kern/tty_pts.c
index d6f10f30f4e5..1f87cbad46ee 100644
--- a/sys/kern/tty_pts.c
+++ b/sys/kern/tty_pts.c
@@ -701,13 +701,8 @@ posix_openpt(struct thread *td, struct posix_openpt_args *uap)
static int
ptmx_fdopen(struct cdev *dev, int fflags, struct thread *td, struct file *fp)
{
- int error;
- error = pts_alloc(fflags & (FREAD|FWRITE), td, fp);
- if (error != 0)
- return (error);
-
- return (0);
+ return (pts_alloc(fflags & (FREAD|FWRITE), td, fp));
}
static struct cdevsw ptmx_cdevsw = {