diff options
author | Martin Pieuchot <mpi@cvs.openbsd.org> | 2016-09-19 16:46:11 +0000 |
---|---|---|
committer | Martin Pieuchot <mpi@cvs.openbsd.org> | 2016-09-19 16:46:11 +0000 |
commit | 9b5ec4b04ca601fdf003ef06babf5bf2c2604ce3 (patch) | |
tree | 98f36e3a1274af129133dcc631b99d7b67c8b1b3 /sys/dev/usb | |
parent | 4341845394ef87c6c349af12bdf0f5b0cce41c34 (diff) |
Correctly check for valid maximum packet size.
from jsg@
Diffstat (limited to 'sys/dev/usb')
-rw-r--r-- | sys/dev/usb/usb_subr.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/dev/usb/usb_subr.c b/sys/dev/usb/usb_subr.c index 21a98a7d2a4..d3165bc8157 100644 --- a/sys/dev/usb/usb_subr.c +++ b/sys/dev/usb/usb_subr.c @@ -1,4 +1,4 @@ -/* $OpenBSD: usb_subr.c,v 1.130 2016/09/19 10:20:17 mpi Exp $ */ +/* $OpenBSD: usb_subr.c,v 1.131 2016/09/19 16:46:10 mpi Exp $ */ /* $NetBSD: usb_subr.c,v 1.103 2003/01/10 11:19:13 augustss Exp $ */ /* $FreeBSD: src/sys/dev/usb/usb_subr.c,v 1.18 1999/11/17 22:33:47 n_hibma Exp $ */ @@ -1184,7 +1184,7 @@ usbd_new_device(struct device *parent, struct usbd_bus *bus, int depth, if (mps != mps0) { if ((speed == USB_SPEED_LOW) || - (mps != 8 || mps != 16 || mps != 32 || mps != 64)) { + (mps != 8 && mps != 16 && mps != 32 && mps != 64)) { usb_free_device(dev); up->device = NULL; return (USBD_INVAL); |