summaryrefslogtreecommitdiffstats
path: root/drivers/input/joystick
diff options
context:
space:
mode:
authorDmitry Torokhov2017-04-03 21:01:20 +0200
committerDmitry Torokhov2017-04-03 21:01:20 +0200
commit03b22057e8ed2d1df416c9ae8e6e247e0b87ecc8 (patch)
treecd89bdd4053e46ff3cbd67adeffa24310c04e725 /drivers/input/joystick
parentInput: silead - list all supported compatible strings in binding document (diff)
parentLinux 4.11-rc5 (diff)
downloadkernel-qcow2-linux-03b22057e8ed2d1df416c9ae8e6e247e0b87ecc8.tar.gz
kernel-qcow2-linux-03b22057e8ed2d1df416c9ae8e6e247e0b87ecc8.tar.xz
kernel-qcow2-linux-03b22057e8ed2d1df416c9ae8e6e247e0b87ecc8.zip
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/joystick')
-rw-r--r--drivers/input/joystick/iforce/iforce-usb.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/input/joystick/iforce/iforce-usb.c b/drivers/input/joystick/iforce/iforce-usb.c
index d96aa27dfcdc..db64adfbe1af 100644
--- a/drivers/input/joystick/iforce/iforce-usb.c
+++ b/drivers/input/joystick/iforce/iforce-usb.c
@@ -141,6 +141,9 @@ static int iforce_usb_probe(struct usb_interface *intf,
interface = intf->cur_altsetting;
+ if (interface->desc.bNumEndpoints < 2)
+ return -ENODEV;
+
epirq = &interface->endpoint[0].desc;
epout = &interface->endpoint[1].desc;