diff options
author | anton <anton@cvs.openbsd.org> | 2019-05-24 06:05:39 +0000 |
---|---|---|
committer | anton <anton@cvs.openbsd.org> | 2019-05-24 06:05:39 +0000 |
commit | 9af3c67291c12c4bd9daa58d54380c3ad4e683ae (patch) | |
tree | 3f1bb4182350be2f8e66a89c984528a367845d10 /sys | |
parent | 2f63e7fa0eb2a35473adb0c2e06e918dcd37748d (diff) |
Remove redundant conditional. Inspecting flags is the correct way to
determine if the device was opened in read/write mode.
ok mpi@ visa@
Diffstat (limited to 'sys')
-rw-r--r-- | sys/dev/wscons/wsmouse.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/sys/dev/wscons/wsmouse.c b/sys/dev/wscons/wsmouse.c index 19b045a3386..42ba954b0bd 100644 --- a/sys/dev/wscons/wsmouse.c +++ b/sys/dev/wscons/wsmouse.c @@ -1,4 +1,4 @@ -/* $OpenBSD: wsmouse.c,v 1.54 2019/05/22 19:13:34 anton Exp $ */ +/* $OpenBSD: wsmouse.c,v 1.55 2019/05/24 06:05:38 anton Exp $ */ /* $NetBSD: wsmouse.c,v 1.35 2005/02/27 00:27:52 perry Exp $ */ /* @@ -349,11 +349,9 @@ wsmouseclose(dev_t dev, int flags, int mode, struct proc *p) struct wseventvar *evar = sc->sc_base.me_evp; if ((flags & (FREAD | FWRITE)) == FWRITE) - return (0); /* see wsmouseopen() */ - - if (evar == NULL) - /* not open for read */ + /* Not open for read */ return (0); + sc->sc_base.me_evp = NULL; (*sc->sc_accessops->disable)(sc->sc_accesscookie); wsevent_fini(evar); |