Merge tag 'arm-dt-6.0' of git://git.kernel.org/pub/scm/linux/kernel/git/soc/soc
[linux-2.6-microblaze.git] / drivers / input / touchscreen / usbtouchscreen.c
index 43c521f..3dda6ea 100644 (file)
@@ -1654,6 +1654,9 @@ static int usbtouch_probe(struct usb_interface *intf,
        if (id->driver_info == DEVTYPE_IGNORE)
                return -ENODEV;
 
+       if (id->driver_info >= ARRAY_SIZE(usbtouch_dev_info))
+               return -ENODEV;
+
        endpoint = usbtouch_get_input_endpoint(intf->cur_altsetting);
        if (!endpoint)
                return -ENXIO;