b2c2-flexcop-usb: add sanity checking
PATCH 1/1 b2c2-flexcop-usb: add sanity checking
The driver needs an isochronous endpoint to be present. It will oops in its absence. Add checking for it.
Reported-by [email protected]
Signed-off-by Oliver Neukum <[email protected]>
--- drivers/media/usb/b2c2/flexcop-usb.c | 3 +++ 1 file changed, 3 insertions(+)
drivers/media/usb/b2c2/flexcop-usb.c +3 -0
@@ -538,6 +538,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 ;
Signature · 1 line
2.16.4