linux-input.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] input: gameport: emu10k1-gp: call pci_disable_device in error path and in remove()
@ 2010-09-26 12:14 Rahul Ruikar
  2010-09-30  1:18 ` Dmitry Torokhov
  0 siblings, 1 reply; 2+ messages in thread
From: Rahul Ruikar @ 2010-09-26 12:14 UTC (permalink / raw)
  To: dmitry.torokhov, nm127; +Cc: linux-input, linux-kernel, Rahul Ruikar

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>
---
 drivers/input/gameport/emu10k1-gp.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/drivers/input/gameport/emu10k1-gp.c b/drivers/input/gameport/emu10k1-gp.c
index 7392992..34615d4 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
 	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);
 }
 
-- 
1.7.2.3


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] input: gameport: emu10k1-gp: call pci_disable_device in error path and in remove()
  2010-09-26 12:14 [PATCH] input: gameport: emu10k1-gp: call pci_disable_device in error path and in remove() Rahul Ruikar
@ 2010-09-30  1:18 ` Dmitry Torokhov
  0 siblings, 0 replies; 2+ messages in thread
From: Dmitry Torokhov @ 2010-09-30  1:18 UTC (permalink / raw)
  To: Rahul Ruikar; +Cc: nm127, linux-input, linux-kernel

On Sun, Sep 26, 2010 at 05:44:45PM +0530, Rahul Ruikar wrote:
> 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>

Applied, thanks Rahul.

-- 
Dmitry

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2010-09-30  1:18 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-09-26 12:14 [PATCH] input: gameport: emu10k1-gp: call pci_disable_device in error path and in remove() Rahul Ruikar
2010-09-30  1:18 ` Dmitry Torokhov

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).