diff options
author | Dmitry Torokhov <dmitry.torokhov@gmail.com> | 2017-04-03 12:01:20 -0700 |
---|---|---|
committer | Dmitry Torokhov <dmitry.torokhov@gmail.com> | 2017-04-03 12:01:20 -0700 |
commit | 03b22057e8ed2d1df416c9ae8e6e247e0b87ecc8 (patch) | |
tree | cd89bdd4053e46ff3cbd67adeffa24310c04e725 /drivers/input/misc | |
parent | 96083b2e90cddfb688e70630a1dbfdfe5fb0262d (diff) | |
parent | a71c9a1c779f2499fb2afc0553e543f18aff6edf (diff) | |
download | op-kernel-dev-03b22057e8ed2d1df416c9ae8e6e247e0b87ecc8.zip op-kernel-dev-03b22057e8ed2d1df416c9ae8e6e247e0b87ecc8.tar.gz |
Merge tag 'v4.11-rc5' into next
Sync up with mainline to bring in changes to input subsystem merged
through other trees.
Diffstat (limited to 'drivers/input/misc')
-rw-r--r-- | drivers/input/misc/cm109.c | 4 | ||||
-rw-r--r-- | drivers/input/misc/ims-pcu.c | 4 | ||||
-rw-r--r-- | drivers/input/misc/yealink.c | 4 |
3 files changed, 12 insertions, 0 deletions
diff --git a/drivers/input/misc/cm109.c b/drivers/input/misc/cm109.c index 9cc6d05..23c191a 100644 --- a/drivers/input/misc/cm109.c +++ b/drivers/input/misc/cm109.c @@ -700,6 +700,10 @@ static int cm109_usb_probe(struct usb_interface *intf, int error = -ENOMEM; interface = intf->cur_altsetting; + + if (interface->desc.bNumEndpoints < 1) + return -ENODEV; + endpoint = &interface->endpoint[0].desc; if (!usb_endpoint_is_int_in(endpoint)) diff --git a/drivers/input/misc/ims-pcu.c b/drivers/input/misc/ims-pcu.c index 9c0ea36..f4e8fbe 100644 --- a/drivers/input/misc/ims-pcu.c +++ b/drivers/input/misc/ims-pcu.c @@ -1667,6 +1667,10 @@ static int ims_pcu_parse_cdc_data(struct usb_interface *intf, struct ims_pcu *pc return -EINVAL; alt = pcu->ctrl_intf->cur_altsetting; + + if (alt->desc.bNumEndpoints < 1) + return -ENODEV; + pcu->ep_ctrl = &alt->endpoint[0].desc; pcu->max_ctrl_size = usb_endpoint_maxp(pcu->ep_ctrl); diff --git a/drivers/input/misc/yealink.c b/drivers/input/misc/yealink.c index 79c964c..6e7ff95 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; |