diff options
author | David Woodhouse <dwmw2@infradead.org> | 2007-01-17 23:34:51 (GMT) |
---|---|---|
committer | David Woodhouse <dwmw2@infradead.org> | 2007-01-17 23:34:51 (GMT) |
commit | 9cdf083f981b8d37b3212400a359368661385099 (patch) | |
tree | aa15a6a08ad87e650dea40fb59b3180bef0d345b /arch/alpha/kernel/sys_miata.c | |
parent | e499e01d234a31d59679b7b1e1cf628d917ba49a (diff) | |
parent | a8b3485287731978899ced11f24628c927890e78 (diff) | |
download | linux-9cdf083f981b8d37b3212400a359368661385099.tar.xz |
Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6
Diffstat (limited to 'arch/alpha/kernel/sys_miata.c')
-rw-r--r-- | arch/alpha/kernel/sys_miata.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/arch/alpha/kernel/sys_miata.c b/arch/alpha/kernel/sys_miata.c index b8b817f..910b43c 100644 --- a/arch/alpha/kernel/sys_miata.c +++ b/arch/alpha/kernel/sys_miata.c @@ -183,11 +183,15 @@ miata_map_irq(struct pci_dev *dev, u8 slot, u8 pin) if((slot == 7) && (PCI_FUNC(dev->devfn) == 3)) { u8 irq=0; - - if(pci_read_config_byte(pci_find_slot(dev->bus->number, dev->devfn & ~(7)), 0x40,&irq)!=PCIBIOS_SUCCESSFUL) + struct pci_dev *pdev = pci_get_slot(dev->bus, dev->devfn & ~7); + if(pdev == NULL || pci_read_config_byte(pdev, 0x40,&irq) != PCIBIOS_SUCCESSFUL) { + pci_dev_put(pdev); return -1; - else + } + else { + pci_dev_put(pdev); return irq; + } } return COMMON_TABLE_LOOKUP; |