aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/core/config.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/usb/core/config.c')
-rw-r--r--drivers/usb/core/config.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/drivers/usb/core/config.c b/drivers/usb/core/config.c
index 0aa9e7d697a5..25dbd8c7aec7 100644
--- a/drivers/usb/core/config.c
+++ b/drivers/usb/core/config.c
@@ -239,6 +239,16 @@ static int usb_parse_endpoint(struct device *ddev, int cfgno, int inum,
239 if (ifp->desc.bNumEndpoints >= num_ep) 239 if (ifp->desc.bNumEndpoints >= num_ep)
240 goto skip_to_next_endpoint_or_interface_descriptor; 240 goto skip_to_next_endpoint_or_interface_descriptor;
241 241
242 /* Check for duplicate endpoint addresses */
243 for (i = 0; i < ifp->desc.bNumEndpoints; ++i) {
244 if (ifp->endpoint[i].desc.bEndpointAddress ==
245 d->bEndpointAddress) {
246 dev_warn(ddev, "config %d interface %d altsetting %d has a duplicate endpoint with address 0x%X, skipping\n",
247 cfgno, inum, asnum, d->bEndpointAddress);
248 goto skip_to_next_endpoint_or_interface_descriptor;
249 }
250 }
251
242 endpoint = &ifp->endpoint[ifp->desc.bNumEndpoints]; 252 endpoint = &ifp->endpoint[ifp->desc.bNumEndpoints];
243 ++ifp->desc.bNumEndpoints; 253 ++ifp->desc.bNumEndpoints;
244 254