V4L/DVB (3743): Fix some more potential oopses

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>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
This commit is contained in:
Andrew de Quincey 2006-04-06 17:05:46 -03:00 committed by Mauro Carvalho Chehab
parent 6445401673
commit a064fad337
2 changed files with 9 additions and 2 deletions

View File

@ -902,7 +902,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;

View File

@ -1507,7 +1507,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 */