summaryrefslogtreecommitdiff
path: root/drivers/usb/misc/lvstest.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/usb/misc/lvstest.c')
-rw-r--r--drivers/usb/misc/lvstest.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/usb/misc/lvstest.c b/drivers/usb/misc/lvstest.c
index 86b4e4b2ab9a..383fa007348f 100644
--- a/drivers/usb/misc/lvstest.c
+++ b/drivers/usb/misc/lvstest.c
@@ -370,6 +370,10 @@ static int lvs_rh_probe(struct usb_interface *intf,
hdev = interface_to_usbdev(intf);
desc = intf->cur_altsetting;
+
+ if (desc->desc.bNumEndpoints < 1)
+ return -ENODEV;
+
endpoint = &desc->endpoint[0].desc;
/* valid only for SS root hub */