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
Input: cm109 - validate number of endpoints before using them
[pandora-kernel.git]
/
drivers
/
input
/
misc
/
cm109.c
diff --git
a/drivers/input/misc/cm109.c
b/drivers/input/misc/cm109.c
index
ab86051
..
d5b382c
100644
(file)
--- a/
drivers/input/misc/cm109.c
+++ b/
drivers/input/misc/cm109.c
@@
-663,6
+663,10
@@
static int cm109_usb_probe(struct usb_interface *intf,
int error = -ENOMEM;
interface = intf->cur_altsetting;
+
+ if (interface->desc.bNumEndpoints < 1)
+ return -ENODEV;
+
endpoint = &interface->endpoint[0].desc;
if (!usb_endpoint_is_int_in(endpoint))