]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
USB: fix typo in wMaxPacketSize validation
authorAlan Stern <stern@rowland.harvard.edu>
Mon, 22 Aug 2016 20:58:53 +0000 (16:58 -0400)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 23 Aug 2016 10:54:32 +0000 (06:54 -0400)
The maximum value allowed for wMaxPacketSize of a high-speed interrupt
endpoint is 1024 bytes, not 1023.

Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Fixes: aed9d65ac327 ("USB: validate wMaxPacketValue entries in endpoint descriptors")
CC: <stable@vger.kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/usb/core/config.c

index 051163189810d4c2a96b28dbb9f758f9ab102f14..15ce4ab11688a87d71934b43a98f60e1c148f980 100644 (file)
@@ -187,7 +187,7 @@ static const unsigned short high_speed_maxpacket_maxes[4] = {
        [USB_ENDPOINT_XFER_CONTROL] = 64,
        [USB_ENDPOINT_XFER_ISOC] = 1024,
        [USB_ENDPOINT_XFER_BULK] = 512,
-       [USB_ENDPOINT_XFER_INT] = 1023,
+       [USB_ENDPOINT_XFER_INT] = 1024,
 };
 static const unsigned short super_speed_maxpacket_maxes[4] = {
        [USB_ENDPOINT_XFER_CONTROL] = 512,