linux-input.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Rahul Ruikar <rahul.ruikar@gmail.com>
To: dmitry.torokhov@gmail.com, nm127@freemail.hu
Cc: linux-input@vger.kernel.org, linux-kernel@vger.kernel.org,
	Rahul Ruikar <rahul.ruikar@gmail.com>
Subject: [PATCH] input: gameport: emu10k1-gp: call pci_disable_device in error path and in remove()
Date: Sun, 26 Sep 2010 17:44:45 +0530	[thread overview]
Message-ID: <1285503285-6219-1-git-send-email-rahul.ruikar@gmail.com> (raw)

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


             reply	other threads:[~2010-09-26 12:15 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-09-26 12:14 Rahul Ruikar [this message]
2010-09-30  1:18 ` [PATCH] input: gameport: emu10k1-gp: call pci_disable_device in error path and in remove() Dmitry Torokhov

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1285503285-6219-1-git-send-email-rahul.ruikar@gmail.com \
    --to=rahul.ruikar@gmail.com \
    --cc=dmitry.torokhov@gmail.com \
    --cc=linux-input@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=nm127@freemail.hu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).