summaryrefslogtreecommitdiffstats
path: root/drivers/usb/gadget/composite.c
diff options
context:
space:
mode:
authorIngo Molnar <mingo@elte.hu>2011-02-14 13:28:29 +0100
committerIngo Molnar <mingo@elte.hu>2011-02-14 13:28:31 +0100
commitb366801c95bdbeda811ac9668a3943051a18c188 (patch)
tree79f08da2ad33a3159e67df344a4c411c88da7db6 /drivers/usb/gadget/composite.c
parenteff9073790e1286aa12bf1c65814d3e0132b12e1 (diff)
parent100b33c8bd8a3235fd0b7948338d6cbb3db3c63d (diff)
downloadlinux-b366801c95bdbeda811ac9668a3943051a18c188.tar.gz
linux-b366801c95bdbeda811ac9668a3943051a18c188.tar.bz2
linux-b366801c95bdbeda811ac9668a3943051a18c188.zip
Merge commit 'v2.6.38-rc4' into x86/numa
Merge reason: Merge latest fixes before applying new patch. Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'drivers/usb/gadget/composite.c')
-rw-r--r--drivers/usb/gadget/composite.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/usb/gadget/composite.c b/drivers/usb/gadget/composite.c
index f6ff8456d52d..1ba4befe336b 100644
--- a/drivers/usb/gadget/composite.c
+++ b/drivers/usb/gadget/composite.c
@@ -928,8 +928,9 @@ unknown:
*/
switch (ctrl->bRequestType & USB_RECIP_MASK) {
case USB_RECIP_INTERFACE:
- if (cdev->config)
- f = cdev->config->interface[intf];
+ if (!cdev->config || w_index >= MAX_CONFIG_INTERFACES)
+ break;
+ f = cdev->config->interface[intf];
break;
case USB_RECIP_ENDPOINT: