summaryrefslogtreecommitdiffstats
path: root/drivers/usb/core
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
parentMerge 5.4-rc5 into usb-next (diff)
parentLinux 5.4-rc6 (diff)
downloadlinux-16c8373ecf7b3c723a8e765d798ea413bc8345a6.tar.xz
linux-16c8373ecf7b3c723a8e765d798ea413bc8345a6.zip
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')
-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 */