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>
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;
gameport_unregister_port(emu->gameport);
release_region(emu->io, emu->size);
+ pci_disable_device(pdev);
kfree(emu);
}