diff options
Diffstat (limited to 'drivers/media/usb/b2c2/flexcop-usb.c')
-rw-r--r-- | drivers/media/usb/b2c2/flexcop-usb.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/drivers/media/usb/b2c2/flexcop-usb.c b/drivers/media/usb/b2c2/flexcop-usb.c index e3234d169065..e731243267e4 100644 --- a/drivers/media/usb/b2c2/flexcop-usb.c +++ b/drivers/media/usb/b2c2/flexcop-usb.c @@ -419,10 +419,9 @@ static void flexcop_usb_transfer_exit(struct flexcop_usb *fc_usb) usb_free_urb(fc_usb->iso_urb[i]); } - if (fc_usb->iso_buffer != NULL) - usb_free_coherent(fc_usb->udev, - fc_usb->buffer_size, fc_usb->iso_buffer, - fc_usb->dma_addr); + usb_free_coherent(fc_usb->udev, fc_usb->buffer_size, + fc_usb->iso_buffer, fc_usb->dma_addr); + } static int flexcop_usb_transfer_init(struct flexcop_usb *fc_usb) @@ -513,6 +512,8 @@ static int flexcop_usb_init(struct flexcop_usb *fc_usb) if (fc_usb->uintf->cur_altsetting->desc.bNumEndpoints < 1) return -ENODEV; + if (!usb_endpoint_is_isoc_in(&fc_usb->uintf->cur_altsetting->endpoint[1].desc)) + return -ENODEV; switch (fc_usb->udev->speed) { case USB_SPEED_LOW: |