Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 250077
b: refs/heads/master
c: 0e8ede5
h: refs/heads/master
i:
  250075: b952b22
v: v3
  • Loading branch information
Julia Lawall authored and Jesse Barnes committed May 10, 2011
1 parent c5bb4ff commit 7578def
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 12 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 83d74e036b94ffbf871667eede5ef02993709452
refs/heads/master: 0e8ede5351b53610363215f750e576ca1db1d0cd
17 changes: 6 additions & 11 deletions trunk/arch/x86/pci/direct.c
Original file line number Diff line number Diff line change
Expand Up @@ -280,29 +280,24 @@ void __init pci_direct_init(int type)

int __init pci_direct_probe(void)
{
struct resource *region, *region2;

if ((pci_probe & PCI_PROBE_CONF1) == 0)
goto type2;
region = request_region(0xCF8, 8, "PCI conf1");
if (!region)
if (!request_region(0xCF8, 8, "PCI conf1"))
goto type2;

if (pci_check_type1()) {
raw_pci_ops = &pci_direct_conf1;
port_cf9_safe = true;
return 1;
}
release_resource(region);
release_region(0xCF8, 8);

type2:
if ((pci_probe & PCI_PROBE_CONF2) == 0)
return 0;
region = request_region(0xCF8, 4, "PCI conf2");
if (!region)
if (!request_region(0xCF8, 4, "PCI conf2"))
return 0;
region2 = request_region(0xC000, 0x1000, "PCI conf2");
if (!region2)
if (!request_region(0xC000, 0x1000, "PCI conf2"))
goto fail2;

if (pci_check_type2()) {
Expand All @@ -311,8 +306,8 @@ int __init pci_direct_probe(void)
return 2;
}

release_resource(region2);
release_region(0xC000, 0x1000);
fail2:
release_resource(region);
release_region(0xCF8, 4);
return 0;
}

0 comments on commit 7578def

Please sign in to comment.