Skip to content

Commit

Permalink
Input: emu10k1-gp - add missing calls to pci_disable_device()
Browse files Browse the repository at this point in the history
pci_disable_device() is called for following 2 cases
- error path in emu_probe()
- in emu_remove()

Signed-off-by: Rahul Ruikar <[email protected]>
Signed-off-by: Dmitry Torokhov <[email protected]>
  • Loading branch information
rahulruikar authored and dtor committed Sep 30, 2010
1 parent 727eeb7 commit d8daece
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions drivers/input/gameport/emu10k1-gp.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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);
}

Expand Down

0 comments on commit d8daece

Please sign in to comment.