From 008d3cb607b312c44919e629541ff1e5cc12ae43 Mon Sep 17 00:00:00 2001 From: Douglas Schilling Landgraf Date: Wed, 12 Nov 2008 00:37:39 -0200 Subject: dvb-ttusb-budget: Add validation for ttusb_alloc_iso_urbs From: Douglas Schilling Landgraf Added validation for ttusb_alloc_iso_urbs Priority: high Signed-off-by: Douglas Schilling Landgraf --- linux/drivers/media/dvb/ttusb-budget/dvb-ttusb-budget.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'linux/drivers/media/dvb') 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 9271e2366..8775b78af 100644 --- a/linux/drivers/media/dvb/ttusb-budget/dvb-ttusb-budget.c +++ b/linux/drivers/media/dvb/ttusb-budget/dvb-ttusb-budget.c @@ -1685,7 +1685,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"); -- cgit v1.2.3