Thanks to: Thierry MERLE <thierry.merle@free.fr> for pointing this
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
.ModelString = "Hauppauge WinTv-USB",
},
};
+const int usbvision_device_data_size=ARRAY_SIZE(usbvision_device_data);
/* Supported Devices */
#define PINNA_LINX_VD_IN_CAB_PAL 62
#define PINNA_PCTV_BUNGEE_PAL_FM 63
#define HPG_WINTV 64
+
+extern const int usbvision_device_data_size;
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);