Skip to content

Commit

Permalink
V4L/DVB: ngene: Fix unloading of module
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Roland Praml authored and Mauro Carvalho Chehab committed Feb 26, 2010
1 parent adc1d21 commit dc35c9a
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions drivers/media/dvb/ngene/ngene-core.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -2618,6 +2620,8 @@ static int __devinit ngene_probe(struct pci_dev *pci_dev,
ngene_stop(dev);
fail1:
ngene_release_buffers(dev);
fail0:
pci_disable_device(pci_dev);
pci_set_drvdata(pci_dev, 0);
return stat;
}
Expand Down Expand Up @@ -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,
};

Expand Down

0 comments on commit dc35c9a

Please sign in to comment.