kernel/drivers/media/radio/radio-shark.c
.. .. @@ -316,6 +316,16 @@ 316 316 { 317 317 struct shark_device *shark; 318 318 int retval = -ENOMEM; 319 + static const u8 ep_addresses[] = {320 + SHARK_IN_EP | USB_DIR_IN,321 + SHARK_OUT_EP | USB_DIR_OUT,322 + 0};323 +324 + /* Are the expected endpoints present? */325 + if (!usb_check_int_endpoints(intf, ep_addresses)) {326 + dev_err(&intf->dev, "Invalid radioSHARK device\n");327 + return -EINVAL;328 + }319 329 320 330 shark = kzalloc(sizeof(struct shark_device), GFP_KERNEL); 321 331 if (!shark)