summaryrefslogtreecommitdiffstats
path: root/sys
diff options
context:
space:
mode:
authormpi <mpi@openbsd.org>2017-10-09 08:26:16 +0000
committermpi <mpi@openbsd.org>2017-10-09 08:26:16 +0000
commitd89ebf1c439e6882f5183f718d6d0533446aed65 (patch)
tree286eee645e68398a933bc306ed9fca2806d033e6 /sys
parentMake _kernel_lock_held() always succeed after panic(9). (diff)
downloadwireguard-openbsd-d89ebf1c439e6882f5183f718d6d0533446aed65.tar.xz
wireguard-openbsd-d89ebf1c439e6882f5183f718d6d0533446aed65.zip
Correct logic check preventing the device to attach.
Fix regression introdruced in previous. Found the hardway and diff from weerd@
Diffstat (limited to 'sys')
-rw-r--r--sys/dev/usb/umcs.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/dev/usb/umcs.c b/sys/dev/usb/umcs.c
index fb90882718a..9a3be56cc57 100644
--- a/sys/dev/usb/umcs.c
+++ b/sys/dev/usb/umcs.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: umcs.c,v 1.5 2017/08/10 15:11:34 mpi Exp $ */
+/* $OpenBSD: umcs.c,v 1.6 2017/10/09 08:26:16 mpi Exp $ */
/* $NetBSD: umcs.c,v 1.8 2014/08/23 21:37:56 martin Exp $ */
/* $FreeBSD: head/sys/dev/usb/serial/umcs.c 260559 2014-01-12 11:44:28Z hselasky $ */
@@ -209,7 +209,7 @@ umcs_attach(struct device *parent, struct device *self, void *aux)
*
* Also, see notes in header file for these constants.
*/
- if (!umcs_get_reg(sc, UMCS_GPIO, &data)) {
+ if (umcs_get_reg(sc, UMCS_GPIO, &data)) {
printf("%s: unable to get number of ports\n", DEVNAME(sc));
usbd_deactivate(sc->sc_udev);
return;