Skip to contentSkip to conversation

input: gameport: emu10k1-gp: call pci_disable_device in error path and in remove()

PATCH Applied Rahul Ruikar 2 participants 2 messages Sep 26, 2010 – Sep 30, 2010

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 input: gameport: emu10k1-gp: call pci_disable_device in error path and in remove()

pci_disable_device() is called for following 2 cases
- error path in emu_probe()
- in emu_remove()

---
 drivers/input/gameport/emu10k1-gp.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)
drivers/input/gameport/emu10k1-gp.c +2 -0
index 7392992..34615d4 100644
@@ -77,6 +77,7 @@ static int __devinit emu_probe(struct pci_dev *pdev, const struct pci_device_id
 	if (!emu || !port) {
 		printk(KERN_ERR "emu10k1-gp: Memory allocation failed\n");
 		release_region(ioport, iolen);
+		pci_disable_device(pdev);
 		kfree(emu);
 		gameport_free_port(port);
 		return -ENOMEM;
@@ -105,6 +106,7 @@ static void __devexit emu_remove(struct pci_dev *pdev)
 
 	gameport_unregister_port(emu->gameport);
 	release_region(emu->io, emu->size);
+	pci_disable_device(pdev);
 	kfree(emu);
 }
 
Signature · 1 line
1.7.2.3
maintainer Applied
#1 lore raw
Quoted 5 lines · Rahul Ruikar

pci_disable_device() is called for following 2 cases
- error path in emu_probe()
- in emu_remove()

Applied, thanks Rahul.

Signature · 1 line
Dmitry