summaryrefslogtreecommitdiff
path: root/sys/dev/usb
diff options
context:
space:
mode:
authorJoshua Stein <jcs@cvs.openbsd.org>2016-01-12 19:16:22 +0000
committerJoshua Stein <jcs@cvs.openbsd.org>2016-01-12 19:16:22 +0000
commit4675959a325450dc1d6f2b302bfdab0715816eab (patch)
tree7af105a7789b5d99c645144950f2783dbf1b7c2a /sys/dev/usb
parent3b0a4c457bb70d0fa99716ad827056195386ebd7 (diff)
properly initialize quirks before sending them to hid layer, broken
during hid abstraction problem noticed and fix tested by abieber
Diffstat (limited to 'sys/dev/usb')
-rw-r--r--sys/dev/usb/ukbd.c4
-rw-r--r--sys/dev/usb/ums.c4
2 files changed, 4 insertions, 4 deletions
diff --git a/sys/dev/usb/ukbd.c b/sys/dev/usb/ukbd.c
index ed637adbfc1..e840b25a3df 100644
--- a/sys/dev/usb/ukbd.c
+++ b/sys/dev/usb/ukbd.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ukbd.c,v 1.75 2016/01/09 04:14:42 jcs Exp $ */
+/* $OpenBSD: ukbd.c,v 1.76 2016/01/12 19:16:21 jcs Exp $ */
/* $NetBSD: ukbd.c,v 1.85 2003/03/11 16:44:00 augustss Exp $ */
/*
@@ -207,7 +207,7 @@ ukbd_attach(struct device *parent, struct device *self, void *aux)
struct hidkbd *kbd = &sc->sc_kbd;
struct uhidev_attach_arg *uha = (struct uhidev_attach_arg *)aux;
struct usb_hid_descriptor *hid;
- u_int32_t quirks, qflags;
+ u_int32_t quirks, qflags = 0;
int dlen, repid;
int console = 1;
void *desc;
diff --git a/sys/dev/usb/ums.c b/sys/dev/usb/ums.c
index a1ab3e71059..f9cd4ac6cc5 100644
--- a/sys/dev/usb/ums.c
+++ b/sys/dev/usb/ums.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ums.c,v 1.42 2016/01/09 04:14:42 jcs Exp $ */
+/* $OpenBSD: ums.c,v 1.43 2016/01/12 19:16:21 jcs Exp $ */
/* $NetBSD: ums.c,v 1.60 2003/03/11 16:44:00 augustss Exp $ */
/*
@@ -121,7 +121,7 @@ ums_attach(struct device *parent, struct device *self, void *aux)
struct usb_attach_arg *uaa = uha->uaa;
int size, repid;
void *desc;
- u_int32_t quirks, qflags;
+ u_int32_t quirks, qflags = 0;
sc->sc_hdev.sc_intr = ums_intr;
sc->sc_hdev.sc_parent = uha->parent;