git.openpandora.org
/
pandora-kernel.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
USB: idmouse: fix NULL-deref at probe
[pandora-kernel.git]
/
drivers
/
usb
/
misc
/
idmouse.c
diff --git
a/drivers/usb/misc/idmouse.c
b/drivers/usb/misc/idmouse.c
index
515b67f
..
848322e
100644
(file)
--- a/
drivers/usb/misc/idmouse.c
+++ b/
drivers/usb/misc/idmouse.c
@@
-346,6
+346,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)