lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <1285503285-6219-1-git-send-email-rahul.ruikar@gmail.com>
Date:	Sun, 26 Sep 2010 17:44:45 +0530
From:	Rahul Ruikar <rahul.ruikar@...il.com>
To:	dmitry.torokhov@...il.com, nm127@...email.hu
Cc:	linux-input@...r.kernel.org, linux-kernel@...r.kernel.org,
	Rahul Ruikar <rahul.ruikar@...il.com>
Subject: [PATCH] input: gameport: emu10k1-gp: call pci_disable_device in error path and in remove()

pci_disable_device() is called for following 2 cases
- error path in emu_probe()
- in emu_remove()

Signed-off-by: Rahul Ruikar <rahul.ruikar@...il.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

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ