| To: | kernel-janitors@lists.osdl.org, stevel@mvista.com, source@mvista.com, linux-mips@linux-mips.org |
|---|---|
| Subject: | [PATCH 2/6] janitor: net/gt96100eth: pci_find_device to pci_get_device |
| From: | Scott Feldman <sfeldma@pobox.com> |
| Date: | Sat, 02 Oct 2004 23:19:31 -0700 |
| Original-recipient: | rfc822;linux-mips@linux-mips.org |
| Reply-to: | sfeldma@pobox.com |
| Sender: | linux-mips-bounce@linux-mips.org |
Replace pci_find_device with pci_get_device/pci_dev_put to plug
race with pci_find_device.
Signed-off-by: Scott Feldman <sfeldma@pobox.com>
--- linux-2.6.9-rc3/drivers/net/gt96100eth.c 2004-10-02 21:17:24.000000000
-0700
+++ linux-2.6.9-rc3-dsf/drivers/net/gt96100eth.c 2004-10-02
21:23:57.000000000 -0700
@@ -617,9 +617,9 @@ static int gt96100_init_module(void)
/*
* Stupid probe because this really isn't a PCI device
*/
- if (!(pci = pci_find_device(PCI_VENDOR_ID_MARVELL,
+ if (!(pci = pci_get_device(PCI_VENDOR_ID_MARVELL,
PCI_DEVICE_ID_MARVELL_GT96100, NULL)) &&
- !(pci = pci_find_device(PCI_VENDOR_ID_MARVELL,
+ !(pci = pci_get_device(PCI_VENDOR_ID_MARVELL,
PCI_DEVICE_ID_MARVELL_GT96100A, NULL))) {
printk(KERN_ERR __FILE__ ": GT96100 not found!\n");
return -ENODEV;
@@ -629,12 +629,14 @@ static int gt96100_init_module(void)
if (cpuConfig & (1<<12)) {
printk(KERN_ERR __FILE__
": must be in Big Endian mode!\n");
+ pci_dev_put(pci);
return -ENODEV;
}
for (i=0; i < NUM_INTERFACES; i++)
retval |= gt96100_probe1(pci, i);
+ pci_dev_put(pci);
return retval;
}
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| ||
| Previous by Date: | Re: Building 2.6 cvs head on db1550, Maciej W. Rozycki |
|---|---|
| Next by Date: | Re: [Kernel-janitors] [PATCH 2/6] janitor: net/gt96100eth: pci_find_device to pci_get_device, Christoph Hellwig |
| Previous by Thread: | Re: Kernel 2.6 for R4600 Indy, Thiemo Seufer |
| Next by Thread: | Re: [Kernel-janitors] [PATCH 2/6] janitor: net/gt96100eth: pci_find_device to pci_get_device, Christoph Hellwig |
| Indexes: | [Date] [Thread] [Top] [All Lists] |