diff options
author | Alan Cox <alan@lxorguk.ukuu.org.uk> | 2006-10-03 01:14:35 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-10-03 08:04:09 -0700 |
commit | 652aa16291095911640137155063a5c6ea9bad74 (patch) | |
tree | 6c463c8da82045e9ecdbb1e7e3242c12b4be6bae /drivers/ide/pci/via82cxxx.c | |
parent | a4bea10eca68152e84ffc4eaeb9d20ec2ac34664 (diff) |
[PATCH] IDE: more pci_find cleanup
Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'drivers/ide/pci/via82cxxx.c')
-rw-r--r-- | drivers/ide/pci/via82cxxx.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/ide/pci/via82cxxx.c b/drivers/ide/pci/via82cxxx.c index 9b7589e8e93..2af634d7acf 100644 --- a/drivers/ide/pci/via82cxxx.c +++ b/drivers/ide/pci/via82cxxx.c @@ -248,7 +248,7 @@ static struct via_isa_bridge *via_config_find(struct pci_dev **isa) u8 t; for (via_config = via_isa_bridges; via_config->id; via_config++) - if ((*isa = pci_find_device(PCI_VENDOR_ID_VIA + + if ((*isa = pci_get_device(PCI_VENDOR_ID_VIA + !!(via_config->flags & VIA_BAD_ID), via_config->id, NULL))) { @@ -256,6 +256,7 @@ static struct via_isa_bridge *via_config_find(struct pci_dev **isa) if (t >= via_config->rev_min && t <= via_config->rev_max) break; + pci_dev_put(*isa); } return via_config; @@ -283,6 +284,7 @@ static unsigned int __devinit init_chipset_via82cxxx(struct pci_dev *dev, const via_config = via_config_find(&isa); if (!via_config->id) { printk(KERN_WARNING "VP_IDE: Unknown VIA SouthBridge, disabling DMA.\n"); + pci_dev_put(isa); return -ENODEV; } @@ -361,6 +363,7 @@ static unsigned int __devinit init_chipset_via82cxxx(struct pci_dev *dev, const via_dma[via_config->flags & VIA_UDMA], pci_name(dev)); + pci_dev_put(isa); return 0; } |