Commit dc35c9ae authored by Roland Praml's avatar Roland Praml Committed by Mauro Carvalho Chehab

V4L/DVB: ngene: Fix unloading of module

Fixed unloading of module ngene.
Signed-off-by: default avatarRoland Praml <pram@gmx.de>
Signed-off-by: default avatarMatthias Benesch <twoof7@freenet.de>
Signed-off-by: default avatarOliver Endriss <o.endriss@gmx.de>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@redhat.com>
parent adc1d21e
...@@ -2445,7 +2445,7 @@ static void release_channel(struct ngene_channel *chan) ...@@ -2445,7 +2445,7 @@ static void release_channel(struct ngene_channel *chan)
#endif #endif
if (chan->fe) { if (chan->fe) {
dvb_unregister_frontend(chan->fe); dvb_unregister_frontend(chan->fe);
/*dvb_frontend_detach(chan->fe); */ dvb_frontend_detach(chan->fe);
chan->fe = 0; chan->fe = 0;
} }
dvbdemux->dmx.close(&dvbdemux->dmx); dvbdemux->dmx.close(&dvbdemux->dmx);
...@@ -2577,8 +2577,10 @@ static int __devinit ngene_probe(struct pci_dev *pci_dev, ...@@ -2577,8 +2577,10 @@ static int __devinit ngene_probe(struct pci_dev *pci_dev,
return -ENODEV; return -ENODEV;
dev = vmalloc(sizeof(struct ngene)); dev = vmalloc(sizeof(struct ngene));
if (dev == NULL) if (dev == NULL) {
return -ENOMEM; stat = -ENOMEM;
goto fail0;
}
memset(dev, 0, sizeof(struct ngene)); memset(dev, 0, sizeof(struct ngene));
dev->pci_dev = pci_dev; dev->pci_dev = pci_dev;
...@@ -2618,6 +2620,8 @@ static int __devinit ngene_probe(struct pci_dev *pci_dev, ...@@ -2618,6 +2620,8 @@ static int __devinit ngene_probe(struct pci_dev *pci_dev,
ngene_stop(dev); ngene_stop(dev);
fail1: fail1:
ngene_release_buffers(dev); ngene_release_buffers(dev);
fail0:
pci_disable_device(pci_dev);
pci_set_drvdata(pci_dev, 0); pci_set_drvdata(pci_dev, 0);
return stat; return stat;
} }
...@@ -2743,7 +2747,7 @@ static struct pci_driver ngene_pci_driver = { ...@@ -2743,7 +2747,7 @@ static struct pci_driver ngene_pci_driver = {
.name = "ngene", .name = "ngene",
.id_table = ngene_id_tbl, .id_table = ngene_id_tbl,
.probe = ngene_probe, .probe = ngene_probe,
.remove = ngene_remove, .remove = __devexit_p(ngene_remove),
.err_handler = &ngene_errors, .err_handler = &ngene_errors,
}; };
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment