Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

Rahul Ruikar and committed by
Dmitry Torokhov
d8daece8 727eeb7d

+2
+2
drivers/input/gameport/emu10k1-gp.c
··· 77 77 if (!emu || !port) { 78 78 printk(KERN_ERR "emu10k1-gp: Memory allocation failed\n"); 79 79 release_region(ioport, iolen); 80 + pci_disable_device(pdev); 80 81 kfree(emu); 81 82 gameport_free_port(port); 82 83 return -ENOMEM; ··· 106 105 107 106 gameport_unregister_port(emu->gameport); 108 107 release_region(emu->io, emu->size); 108 + pci_disable_device(pdev); 109 109 kfree(emu); 110 110 } 111 111