aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/misc/idmouse.c
diff options
context:
space:
mode:
authorIngo Molnar <[email protected]>2017-04-03 14:36:32 +0000
committerIngo Molnar <[email protected]>2017-04-03 14:36:32 +0000
commit7f75540ff2ca84dbac26cf9deeb620cbf5646f5e (patch)
tree1eb54748074d3a91f3dd70fb5d4b23bf713f0bd5 /drivers/usb/misc/idmouse.c
parentx86/mm/numa: Remove numa_nodemask_from_meminfo() (diff)
parentLinux 4.11-rc5 (diff)
downloadkernel-7f75540ff2ca84dbac26cf9deeb620cbf5646f5e.tar.gz
kernel-7f75540ff2ca84dbac26cf9deeb620cbf5646f5e.zip
Merge tag 'v4.11-rc5' into x86/mm, to refresh the branch
Signed-off-by: Ingo Molnar <[email protected]>
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 8b9fd7534f69..502bfe30a077 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)