summaryrefslogtreecommitdiff
path: root/drivers/usb/misc/idmouse.c
diff options
context:
space:
mode:
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>2017-03-27 10:19:32 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2017-03-27 10:19:32 +0300
commite47ff590cc57a3468c1f77e5f2494bbaefdd4371 (patch)
tree7c71b3832c0d805b0ee6daa1aaaa50326b65654f /drivers/usb/misc/idmouse.c
parent2e58cafa0bbde529a9f44300382f60f6ce46d7d2 (diff)
parentc02ed2e75ef4c74e41e421acb4ef1494671585e8 (diff)
downloadlinux-e47ff590cc57a3468c1f77e5f2494bbaefdd4371.tar.xz
Merge 4.11-rc4 into usb-next
This resolves a merge issue in the gadget code, and we want the USB fixes in here as well. Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/usb/misc/idmouse.c')
-rw-r--r--drivers/usb/misc/idmouse.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/usb/misc/idmouse.c b/drivers/usb/misc/idmouse.c
index d185f49c353e..81fcbf024c65 100644
--- a/drivers/usb/misc/idmouse.c
+++ b/drivers/usb/misc/idmouse.c
@@ -347,6 +347,9 @@ static int idmouse_probe(struct usb_interface *interface,
if (iface_desc->desc.bInterfaceClass != 0x0A)
return -ENODEV;
+ if (iface_desc->desc.bNumEndpoints < 1)
+ return -ENODEV;
+
/* allocate memory for our device state and initialize it */
dev = kzalloc(sizeof(*dev), GFP_KERNEL);
if (dev == NULL)