aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/input
diff options
context:
space:
mode:
authorRahul Ruikar <rahul.ruikar@gmail.com>2010-09-29 21:12:46 -0400
committerDmitry Torokhov <dmitry.torokhov@gmail.com>2010-09-29 21:25:52 -0400
commitd8daece8f457883e8f2e3065a1e02322ed444ddb (patch)
treec32ae47db4b4802f461fcdab15f3654489c04c59 /drivers/input
parent727eeb7dbeac8a7ecd2ad943eb27a5566ab83601 (diff)
Input: emu10k1-gp - add missing calls to pci_disable_device()
pci_disable_device() is called for following 2 cases - error path in emu_probe() - in emu_remove() Signed-off-by: Rahul Ruikar <rahul.ruikar@gmail.com> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
Diffstat (limited to 'drivers/input')
-rw-r--r--drivers/input/gameport/emu10k1-gp.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/input/gameport/emu10k1-gp.c b/drivers/input/gameport/emu10k1-gp.c
index 7392992da424..34615d40528a 100644
--- a/drivers/input/gameport/emu10k1-gp.c
+++ b/drivers/input/gameport/emu10k1-gp.c
@@ -77,6 +77,7 @@ static int __devinit emu_probe(struct pci_dev *pdev, const struct pci_device_id
77 if (!emu || !port) { 77 if (!emu || !port) {
78 printk(KERN_ERR "emu10k1-gp: Memory allocation failed\n"); 78 printk(KERN_ERR "emu10k1-gp: Memory allocation failed\n");
79 release_region(ioport, iolen); 79 release_region(ioport, iolen);
80 pci_disable_device(pdev);
80 kfree(emu); 81 kfree(emu);
81 gameport_free_port(port); 82 gameport_free_port(port);
82 return -ENOMEM; 83 return -ENOMEM;
@@ -105,6 +106,7 @@ static void __devexit emu_remove(struct pci_dev *pdev)
105 106
106 gameport_unregister_port(emu->gameport); 107 gameport_unregister_port(emu->gameport);
107 release_region(emu->io, emu->size); 108 release_region(emu->io, emu->size);
109 pci_disable_device(pdev);
108 kfree(emu); 110 kfree(emu);
109} 111}
110 112