aboutsummaryrefslogtreecommitdiff
path: root/drivers/usb/misc/lvstest.c
diff options
context:
space:
mode:
authorAlex Shi <alex.shi@linaro.org>2017-05-31 12:02:43 +0800
committerAlex Shi <alex.shi@linaro.org>2017-05-31 12:02:43 +0800
commita898540914d4136f29bc738ce593c1c501006f23 (patch)
tree9440b7f76c029143611c89ed919718ba6ff353f4 /drivers/usb/misc/lvstest.c
parentd97f745e1d2fea4d2f308e5e06eee81a9a84f3f5 (diff)
parent56d847e3ef9433d7ac92376e4ba49d3cf3cb70d2 (diff)
Merge tag 'v4.1.40' into linux-linaro-lsk-v4.1lsk-v4.1-17.06lsk-v4.1-17.05linux-linaro-lsk-v4.1
This is the 4.1.40 stable release
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 62cb8cd08403..66e2d036bb37 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 */