summaryrefslogtreecommitdiff
path: root/drivers/usb/core/config.c
diff options
context:
space:
mode:
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>2019-11-04 06:41:09 +0100
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2019-11-04 06:41:09 +0100
commit16c8373ecf7b3c723a8e765d798ea413bc8345a6 (patch)
tree19684614078313ac940ce1ad744772dac71b91a6 /drivers/usb/core/config.c
parentd19f1d44e74322ae2a75dc07b7d44fecacd5bcfb (diff)
parenta99d8080aaf358d5d23581244e5da23b35e340b9 (diff)
Merge 5.4-rc6 into usb-next
We need the USB fixes in here to build on top of. Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/usb/core/config.c')
-rw-r--r--drivers/usb/core/config.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/usb/core/config.c b/drivers/usb/core/config.c
index ff9f50f7218f..5f40117e68e7 100644
--- a/drivers/usb/core/config.c
+++ b/drivers/usb/core/config.c
@@ -348,6 +348,11 @@ static int usb_parse_endpoint(struct device *ddev, int cfgno, int inum,
/* Validate the wMaxPacketSize field */
maxp = usb_endpoint_maxp(&endpoint->desc);
+ if (maxp == 0) {
+ dev_warn(ddev, "config %d interface %d altsetting %d endpoint 0x%X has wMaxPacketSize 0, skipping\n",
+ cfgno, inum, asnum, d->bEndpointAddress);
+ goto skip_to_next_endpoint_or_interface_descriptor;
+ }
/* Find the highest legal maxpacket size for this endpoint */
i = 0; /* additional transactions per microframe */