diff options
author | Roland Praml <pram@gmx.de> | 2009-12-20 04:48:14 +0300 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2010-02-26 21:10:54 +0300 |
commit | dc35c9ae193564af2003117857848d69af24d534 (patch) | |
tree | 69b0c34a598febc2ade909396ea608712c24f688 /drivers/media/dvb | |
parent | adc1d21eec74afbd38a9099f4aff4bcd5b9eaea2 (diff) | |
download | linux-dc35c9ae193564af2003117857848d69af24d534.tar.xz |
V4L/DVB: ngene: Fix unloading of module
Fixed unloading of module ngene.
Signed-off-by: Roland Praml <pram@gmx.de>
Signed-off-by: Matthias Benesch <twoof7@freenet.de>
Signed-off-by: Oliver Endriss <o.endriss@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/dvb')
-rw-r--r-- | drivers/media/dvb/ngene/ngene-core.c | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/drivers/media/dvb/ngene/ngene-core.c b/drivers/media/dvb/ngene/ngene-core.c index cf12bff57440..52798b7c8d96 100644 --- a/drivers/media/dvb/ngene/ngene-core.c +++ b/drivers/media/dvb/ngene/ngene-core.c @@ -2445,7 +2445,7 @@ static void release_channel(struct ngene_channel *chan) #endif if (chan->fe) { dvb_unregister_frontend(chan->fe); - /*dvb_frontend_detach(chan->fe); */ + dvb_frontend_detach(chan->fe); chan->fe = 0; } dvbdemux->dmx.close(&dvbdemux->dmx); @@ -2577,8 +2577,10 @@ static int __devinit ngene_probe(struct pci_dev *pci_dev, return -ENODEV; dev = vmalloc(sizeof(struct ngene)); - if (dev == NULL) - return -ENOMEM; + if (dev == NULL) { + stat = -ENOMEM; + goto fail0; + } memset(dev, 0, sizeof(struct ngene)); dev->pci_dev = pci_dev; @@ -2618,6 +2620,8 @@ fail2: ngene_stop(dev); fail1: ngene_release_buffers(dev); +fail0: + pci_disable_device(pci_dev); pci_set_drvdata(pci_dev, 0); return stat; } @@ -2743,7 +2747,7 @@ static struct pci_driver ngene_pci_driver = { .name = "ngene", .id_table = ngene_id_tbl, .probe = ngene_probe, - .remove = ngene_remove, + .remove = __devexit_p(ngene_remove), .err_handler = &ngene_errors, }; |