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.
This commit is contained in:
Ed Schouten 2008-11-04 10:58:02 +00:00
parent c63c25015a
commit 394e94079c

View File

@ -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 = {