summaryrefslogtreecommitdiff
path: root/drivers/media/usb/gspca/stv06xx/stv06xx_pb0100.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/media/usb/gspca/stv06xx/stv06xx_pb0100.c')
-rw-r--r--drivers/media/usb/gspca/stv06xx/stv06xx_pb0100.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/media/usb/gspca/stv06xx/stv06xx_pb0100.c b/drivers/media/usb/gspca/stv06xx/stv06xx_pb0100.c
index 6d1007715ff7..ae382b3b5f7f 100644
--- a/drivers/media/usb/gspca/stv06xx/stv06xx_pb0100.c
+++ b/drivers/media/usb/gspca/stv06xx/stv06xx_pb0100.c
@@ -185,6 +185,10 @@ static int pb0100_start(struct sd *sd)
alt = usb_altnum_to_altsetting(intf, sd->gspca_dev.alt);
if (!alt)
return -ENODEV;
+
+ if (alt->desc.bNumEndpoints < 1)
+ return -ENODEV;
+
packet_size = le16_to_cpu(alt->endpoint[0].desc.wMaxPacketSize);
/* If we don't have enough bandwidth use a lower framerate */