aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/dvb/ttusb-budget/dvb-ttusb-budget.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/media/dvb/ttusb-budget/dvb-ttusb-budget.c')
-rw-r--r--drivers/media/dvb/ttusb-budget/dvb-ttusb-budget.c15
1 files changed, 14 insertions, 1 deletions
diff --git a/drivers/media/dvb/ttusb-budget/dvb-ttusb-budget.c b/drivers/media/dvb/ttusb-budget/dvb-ttusb-budget.c
index 66ab0c6e9783..4a3f2b8ea37d 100644
--- a/drivers/media/dvb/ttusb-budget/dvb-ttusb-budget.c
+++ b/drivers/media/dvb/ttusb-budget/dvb-ttusb-budget.c
@@ -808,6 +808,12 @@ static int ttusb_alloc_iso_urbs(struct ttusb *ttusb)
808 ISO_BUF_COUNT, 808 ISO_BUF_COUNT,
809 &ttusb->iso_dma_handle); 809 &ttusb->iso_dma_handle);
810 810
811 if (!ttusb->iso_buffer) {
812 dprintk("%s: pci_alloc_consistent - not enough memory\n",
813 __func__);
814 return -ENOMEM;
815 }
816
811 memset(ttusb->iso_buffer, 0, 817 memset(ttusb->iso_buffer, 0,
812 ISO_FRAME_SIZE * FRAMES_PER_ISO_BUF * ISO_BUF_COUNT); 818 ISO_FRAME_SIZE * FRAMES_PER_ISO_BUF * ISO_BUF_COUNT);
813 819
@@ -1659,7 +1665,14 @@ static int ttusb_probe(struct usb_interface *intf, const struct usb_device_id *i
1659 1665
1660 ttusb_setup_interfaces(ttusb); 1666 ttusb_setup_interfaces(ttusb);
1661 1667
1662 ttusb_alloc_iso_urbs(ttusb); 1668 result = ttusb_alloc_iso_urbs(ttusb);
1669 if (result < 0) {
1670 dprintk("%s: ttusb_alloc_iso_urbs - failed\n", __func__);
1671 mutex_unlock(&ttusb->semi2c);
1672 kfree(ttusb);
1673 return result;
1674 }
1675
1663 if (ttusb_init_controller(ttusb)) 1676 if (ttusb_init_controller(ttusb))
1664 printk("ttusb_init_controller: error\n"); 1677 printk("ttusb_init_controller: error\n");
1665 1678