summaryrefslogtreecommitdiffstats
path: root/drivers/media/video/usbvision/usbvision-video.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/media/video/usbvision/usbvision-video.c')
-rw-r--r--drivers/media/video/usbvision/usbvision-video.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/media/video/usbvision/usbvision-video.c b/drivers/media/video/usbvision/usbvision-video.c
index aa6509391bf..df030bf84c0 100644
--- a/drivers/media/video/usbvision/usbvision-video.c
+++ b/drivers/media/video/usbvision/usbvision-video.c
@@ -1792,6 +1792,10 @@ static int __devinit usbvision_probe(struct usb_interface *intf,
dev->descriptor.idProduct, ifnum);
model = devid->driver_info;
+ if ( (model<0) || (model>=usbvision_device_data_size) ) {
+ printk(KERN_INFO "model out of bounds %d\n",model);
+ return -ENODEV;
+ }
printk(KERN_INFO "%s: %s found\n", __FUNCTION__,
usbvision_device_data[model].ModelString);