summaryrefslogtreecommitdiffstats
path: root/sys/dev/usb/uhid.c
diff options
context:
space:
mode:
authornicm <nicm@openbsd.org>2011-07-02 22:20:07 +0000
committernicm <nicm@openbsd.org>2011-07-02 22:20:07 +0000
commitb8d5a5fb3cd18b5becb179d749e65fc04a659093 (patch)
treea14bf2c9e20868318f34cb59c7793894408769bf /sys/dev/usb/uhid.c
parentPer recommandation in the the sparc docs, use unlocked reads when (diff)
downloadwireguard-openbsd-b8d5a5fb3cd18b5becb179d749e65fc04a659093.tar.xz
wireguard-openbsd-b8d5a5fb3cd18b5becb179d749e65fc04a659093.zip
kqueue attach functions should return an errno or 0, not a plain 1. Fix
the obvious cases to return EINVAL and ENXIO. ok tedu deraadt
Diffstat (limited to 'sys/dev/usb/uhid.c')
-rw-r--r--sys/dev/usb/uhid.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/dev/usb/uhid.c b/sys/dev/usb/uhid.c
index 3b564cbf39a..0a4393f9e5a 100644
--- a/sys/dev/usb/uhid.c
+++ b/sys/dev/usb/uhid.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: uhid.c,v 1.51 2011/01/25 20:03:36 jakemsr Exp $ */
+/* $OpenBSD: uhid.c,v 1.52 2011/07/02 22:20:08 nicm Exp $ */
/* $NetBSD: uhid.c,v 1.57 2003/03/11 16:44:00 augustss Exp $ */
/*
@@ -564,7 +564,7 @@ uhidkqfilter(dev_t dev, struct knote *kn)
break;
default:
- return (1);
+ return (EINVAL);
}
kn->kn_hook = (void *)sc;