diff options
author | Roland Praml <pram@gmx.de> | 2009-12-19 20:48:14 -0500 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2010-02-26 13:10:54 -0500 |
commit | dc35c9ae193564af2003117857848d69af24d534 (patch) | |
tree | 69b0c34a598febc2ade909396ea608712c24f688 /drivers | |
parent | adc1d21eec74afbd38a9099f4aff4bcd5b9eaea2 (diff) |
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')
-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) | |||
2445 | #endif | 2445 | #endif |
2446 | if (chan->fe) { | 2446 | if (chan->fe) { |
2447 | dvb_unregister_frontend(chan->fe); | 2447 | dvb_unregister_frontend(chan->fe); |
2448 | /*dvb_frontend_detach(chan->fe); */ | 2448 | dvb_frontend_detach(chan->fe); |
2449 | chan->fe = 0; | 2449 | chan->fe = 0; |
2450 | } | 2450 | } |
2451 | dvbdemux->dmx.close(&dvbdemux->dmx); | 2451 | dvbdemux->dmx.close(&dvbdemux->dmx); |
@@ -2577,8 +2577,10 @@ static int __devinit ngene_probe(struct pci_dev *pci_dev, | |||
2577 | return -ENODEV; | 2577 | return -ENODEV; |
2578 | 2578 | ||
2579 | dev = vmalloc(sizeof(struct ngene)); | 2579 | dev = vmalloc(sizeof(struct ngene)); |
2580 | if (dev == NULL) | 2580 | if (dev == NULL) { |
2581 | return -ENOMEM; | 2581 | stat = -ENOMEM; |
2582 | goto fail0; | ||
2583 | } | ||
2582 | memset(dev, 0, sizeof(struct ngene)); | 2584 | memset(dev, 0, sizeof(struct ngene)); |
2583 | 2585 | ||
2584 | dev->pci_dev = pci_dev; | 2586 | dev->pci_dev = pci_dev; |
@@ -2618,6 +2620,8 @@ fail2: | |||
2618 | ngene_stop(dev); | 2620 | ngene_stop(dev); |
2619 | fail1: | 2621 | fail1: |
2620 | ngene_release_buffers(dev); | 2622 | ngene_release_buffers(dev); |
2623 | fail0: | ||
2624 | pci_disable_device(pci_dev); | ||
2621 | pci_set_drvdata(pci_dev, 0); | 2625 | pci_set_drvdata(pci_dev, 0); |
2622 | return stat; | 2626 | return stat; |
2623 | } | 2627 | } |
@@ -2743,7 +2747,7 @@ static struct pci_driver ngene_pci_driver = { | |||
2743 | .name = "ngene", | 2747 | .name = "ngene", |
2744 | .id_table = ngene_id_tbl, | 2748 | .id_table = ngene_id_tbl, |
2745 | .probe = ngene_probe, | 2749 | .probe = ngene_probe, |
2746 | .remove = ngene_remove, | 2750 | .remove = __devexit_p(ngene_remove), |
2747 | .err_handler = &ngene_errors, | 2751 | .err_handler = &ngene_errors, |
2748 | }; | 2752 | }; |
2749 | 2753 | ||