summaryrefslogtreecommitdiff
path: root/linux/drivers
diff options
context:
space:
mode:
authorAndrew de Quincey <adq_dvb@lidskialf.net>2006-04-06 21:05:46 +0100
committerAndrew de Quincey <adq_dvb@lidskialf.net>2006-04-06 21:05:46 +0100
commitb4171f226d40012c3e7510850dc43bc503adf0c7 (patch)
tree2d01359038de07edc687cadbe3fa7cda67a02cff /linux/drivers
parentc2f7c5def32f35793a62672ab9cbb40e61e371f5 (diff)
downloadmediapointer-dvb-s2-b4171f226d40012c3e7510850dc43bc503adf0c7.tar.gz
mediapointer-dvb-s2-b4171f226d40012c3e7510850dc43bc503adf0c7.tar.bz2
Fix some more potential oopses
From: Andrew de Quincey <adq_dvb@lidskialf.net> Spotted a couple more places where it fails to check if dvb_register_adapter() fails. Signed-off-by: Andrew de Quincey <adq_dvb@lidskialf.net>
Diffstat (limited to 'linux/drivers')
-rw-r--r--linux/drivers/media/dvb/cinergyT2/cinergyT2.c5
-rw-r--r--linux/drivers/media/dvb/ttusb-budget/dvb-ttusb-budget.c6
2 files changed, 9 insertions, 2 deletions
diff --git a/linux/drivers/media/dvb/cinergyT2/cinergyT2.c b/linux/drivers/media/dvb/cinergyT2/cinergyT2.c
index 57ab7b0f3..994d12194 100644
--- a/linux/drivers/media/dvb/cinergyT2/cinergyT2.c
+++ b/linux/drivers/media/dvb/cinergyT2/cinergyT2.c
@@ -919,7 +919,10 @@ static int cinergyt2_probe (struct usb_interface *intf,
return -ENOMEM;
}
- dvb_register_adapter(&cinergyt2->adapter, DRIVER_NAME, THIS_MODULE);
+ if ((err = dvb_register_adapter(&cinergyt2->adapter, DRIVER_NAME, THIS_MODULE)) < 0) {
+ kfree(cinergyt2);
+ return err;
+ }
cinergyt2->demux.priv = cinergyt2;
cinergyt2->demux.filternum = 256;
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 69a550871..9484f26f7 100644
--- a/linux/drivers/media/dvb/ttusb-budget/dvb-ttusb-budget.c
+++ b/linux/drivers/media/dvb/ttusb-budget/dvb-ttusb-budget.c
@@ -1515,7 +1515,11 @@ static int ttusb_probe(struct usb_interface *intf, const struct usb_device_id *i
mutex_unlock(&ttusb->semi2c);
- dvb_register_adapter(&ttusb->adapter, "Technotrend/Hauppauge Nova-USB", THIS_MODULE);
+ if ((result = dvb_register_adapter(&ttusb->adapter, "Technotrend/Hauppauge Nova-USB", THIS_MODULE)) < 0) {
+ ttusb_free_iso_urbs(ttusb);
+ kfree(ttusb);
+ return result;
+ }
ttusb->adapter.priv = ttusb;
/* i2c */