aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/usb/b2c2/flexcop-usb.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/media/usb/b2c2/flexcop-usb.c')
-rw-r--r--drivers/media/usb/b2c2/flexcop-usb.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/media/usb/b2c2/flexcop-usb.c b/drivers/media/usb/b2c2/flexcop-usb.c
index a8f3169e30b3..ac4fddfd0a43 100644
--- a/drivers/media/usb/b2c2/flexcop-usb.c
+++ b/drivers/media/usb/b2c2/flexcop-usb.c
@@ -537,6 +537,9 @@ static int flexcop_usb_probe(struct usb_interface *intf,
struct flexcop_device *fc = NULL;
int ret;
+ if (intf->cur_altsetting->desc.bNumEndpoints < 1)
+ return -ENODEV;
+
if ((fc = flexcop_device_kmalloc(sizeof(struct flexcop_usb))) == NULL) {
err("out of memory\n");
return -ENOMEM;