aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/usb/core/hub.c9
1 files changed, 2 insertions, 7 deletions
diff --git a/drivers/usb/core/hub.c b/drivers/usb/core/hub.c
index 64e80b964b8..3924dd080be 100644
--- a/drivers/usb/core/hub.c
+++ b/drivers/usb/core/hub.c
@@ -868,13 +868,8 @@ descriptor_error:
868 868
869 endpoint = &desc->endpoint[0].desc; 869 endpoint = &desc->endpoint[0].desc;
870 870
871 /* Output endpoint? Curiouser and curiouser.. */ 871 /* If it's not an interrupt in endpoint, we'd better punt! */
872 if (!(endpoint->bEndpointAddress & USB_DIR_IN)) 872 if (!usb_endpoint_is_int_in(endpoint))
873 goto descriptor_error;
874
875 /* If it's not an interrupt endpoint, we'd better punt! */
876 if ((endpoint->bmAttributes & USB_ENDPOINT_XFERTYPE_MASK)
877 != USB_ENDPOINT_XFER_INT)
878 goto descriptor_error; 873 goto descriptor_error;
879 874
880 /* We found a hub */ 875 /* We found a hub */