mirror of
https://github.com/torvalds/linux.git
synced 2026-11-25 07:52:34 +00:00
media: 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]> Signed-off-by: Sean Young <[email protected]> Signed-off-by: Mauro Carvalho Chehab <[email protected]>
This commit is contained in:
committed by
Mauro Carvalho Chehab
parent
d52741728a
commit
1b976fc6d6
@@ -544,6 +544,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;
|
||||
|
||||
Reference in New Issue
Block a user