summaryrefslogtreecommitdiff
path: root/drivers/input/misc/yealink.c
diff options
context:
space:
mode:
authorSean Paul <seanpaul@chromium.org>2017-04-04 11:26:14 -0400
committerSean Paul <seanpaul@chromium.org>2017-04-04 11:26:14 -0400
commitc829a33253e018472335b02e6d8bb1bb4213a142 (patch)
tree3da5ab428f3d9f0812f288d32d8893a3f16868b9 /drivers/input/misc/yealink.c
parent9c4ad466d1dd2e067d5fdb2fcdbcc30fc5c145f9 (diff)
parente1b489d207c73e67810659a88c45b8db4bd62773 (diff)
Merge airlied/drm-next into drm-misc-next
Backmerging in order to pull vmwgfx [1] and the new synopsys media format [2] reqs. [1]- http://patchwork.freedesktop.org/patch/msgid/20170331233255.GA38850@syeh-m02 [2]- http://patchwork.freedesktop.org/patch/msgid/20170403163544.kcw5kk52tgku5xua@art_vandelay Signed-off-by: Sean Paul <seanpaul@chromium.org>
Diffstat (limited to 'drivers/input/misc/yealink.c')
-rw-r--r--drivers/input/misc/yealink.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/input/misc/yealink.c b/drivers/input/misc/yealink.c
index 79c964c075f1..6e7ff9561d92 100644
--- a/drivers/input/misc/yealink.c
+++ b/drivers/input/misc/yealink.c
@@ -875,6 +875,10 @@ static int usb_probe(struct usb_interface *intf, const struct usb_device_id *id)
int ret, pipe, i;
interface = intf->cur_altsetting;
+
+ if (interface->desc.bNumEndpoints < 1)
+ return -ENODEV;
+
endpoint = &interface->endpoint[0].desc;
if (!usb_endpoint_is_int_in(endpoint))
return -ENODEV;