summaryrefslogtreecommitdiff
path: root/linux/drivers/media/dvb/ttusb-budget/dvb-ttusb-budget.c
diff options
context:
space:
mode:
authorErik Andrén <erik.andren@gmail.com>2008-12-26 11:58:34 +0100
committerErik Andrén <erik.andren@gmail.com>2008-12-26 11:58:34 +0100
commitda1d0789d659be9f1d2568351f2b9f3d81345aed (patch)
tree71e1067d4024c066f1b7b651205a9cbc222691da /linux/drivers/media/dvb/ttusb-budget/dvb-ttusb-budget.c
parentcbd16cf5e7e4aae60ca283ad27bafae1fcb21102 (diff)
parentac2c9fd519acfcea10f4b1b17b69e9f3d8f49555 (diff)
downloadmediapointer-dvb-s2-da1d0789d659be9f1d2568351f2b9f3d81345aed.tar.gz
mediapointer-dvb-s2-da1d0789d659be9f1d2568351f2b9f3d81345aed.tar.bz2
Merge with the main gspca tree.
From: Erik Andrén <erik.andren@gmail.com> Priority: normal Signed-off-by: Erik Andrén <erik.andren@gmail.com>
Diffstat (limited to 'linux/drivers/media/dvb/ttusb-budget/dvb-ttusb-budget.c')
-rw-r--r--linux/drivers/media/dvb/ttusb-budget/dvb-ttusb-budget.c18
1 files changed, 17 insertions, 1 deletions
diff --git a/linux/drivers/media/dvb/ttusb-budget/dvb-ttusb-budget.c b/linux/drivers/media/dvb/ttusb-budget/dvb-ttusb-budget.c
index 13085a8e2..086b9987f 100644
--- a/linux/drivers/media/dvb/ttusb-budget/dvb-ttusb-budget.c
+++ b/linux/drivers/media/dvb/ttusb-budget/dvb-ttusb-budget.c
@@ -828,6 +828,12 @@ static int ttusb_alloc_iso_urbs(struct ttusb *ttusb)
ISO_BUF_COUNT,
&ttusb->iso_dma_handle);
+ if (!ttusb->iso_buffer) {
+ dprintk("%s: pci_alloc_consistent - not enough memory\n",
+ __func__);
+ return -ENOMEM;
+ }
+
memset(ttusb->iso_buffer, 0,
ISO_FRAME_SIZE * FRAMES_PER_ISO_BUF * ISO_BUF_COUNT);
@@ -1651,6 +1657,9 @@ static void frontend_init(struct ttusb* ttusb)
static struct i2c_algorithm ttusb_dec_algo = {
.master_xfer = master_xfer,
.functionality = functionality,
+#ifdef NEED_ALGO_CONTROL
+ .algo_control = dummy_algo_control,
+#endif
};
static int ttusb_probe(struct usb_interface *intf, const struct usb_device_id *id)
@@ -1679,7 +1688,14 @@ static int ttusb_probe(struct usb_interface *intf, const struct usb_device_id *i
ttusb_setup_interfaces(ttusb);
- ttusb_alloc_iso_urbs(ttusb);
+ result = ttusb_alloc_iso_urbs(ttusb);
+ if (result < 0) {
+ dprintk("%s: ttusb_alloc_iso_urbs - failed\n", __func__);
+ mutex_unlock(&ttusb->semi2c);
+ kfree(ttusb);
+ return result;
+ }
+
if (ttusb_init_controller(ttusb))
printk("ttusb_init_controller: error\n");