summaryrefslogtreecommitdiffstats
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.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/usb/core/config.c b/drivers/usb/core/config.c
index 847dd32c0f..880d52c094 100644
--- a/drivers/usb/core/config.c
+++ b/drivers/usb/core/config.c
@@ -279,11 +279,11 @@ static int usb_parse_endpoint(struct device *ddev, int cfgno,
goto skip_to_next_endpoint_or_interface_descriptor;
}
- i = d->bEndpointAddress & ~USB_ENDPOINT_DIR_MASK;
- if (i >= 16 || i == 0) {
+ i = d->bEndpointAddress & USB_ENDPOINT_NUMBER_MASK;
+ if (i == 0) {
dev_notice(ddev, "config %d interface %d altsetting %d has an "
- "invalid endpoint with address 0x%X, skipping\n",
- cfgno, inum, asnum, d->bEndpointAddress);
+ "invalid descriptor for endpoint zero, skipping\n",
+ cfgno, inum, asnum);
goto skip_to_next_endpoint_or_interface_descriptor;
}