diff options
Diffstat (limited to 'drivers/input/misc/ims-pcu.c')
-rw-r--r-- | drivers/input/misc/ims-pcu.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/input/misc/ims-pcu.c b/drivers/input/misc/ims-pcu.c index 9c0ea36913b4..f4e8fbec6a94 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 | |||
1667 | return -EINVAL; | 1667 | return -EINVAL; |
1668 | 1668 | ||
1669 | alt = pcu->ctrl_intf->cur_altsetting; | 1669 | alt = pcu->ctrl_intf->cur_altsetting; |
1670 | |||
1671 | if (alt->desc.bNumEndpoints < 1) | ||
1672 | return -ENODEV; | ||
1673 | |||
1670 | pcu->ep_ctrl = &alt->endpoint[0].desc; | 1674 | pcu->ep_ctrl = &alt->endpoint[0].desc; |
1671 | pcu->max_ctrl_size = usb_endpoint_maxp(pcu->ep_ctrl); | 1675 | pcu->max_ctrl_size = usb_endpoint_maxp(pcu->ep_ctrl); |
1672 | 1676 | ||