aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86/pci/mmconfig-shared.c
diff options
context:
space:
mode:
authorBjorn Helgaas <bjorn.helgaas@hp.com>2009-11-13 19:33:58 -0500
committerJesse Barnes <jbarnes@virtuousgeek.org>2009-11-24 18:28:56 -0500
commit463a5df175e3ceed684397ee2f8a3eb523d835a0 (patch)
tree014a58e87375f36c58fa4ffbc739e85672e534b0 /arch/x86/pci/mmconfig-shared.c
parent7da7d360ae025158d09aab18d66f5d2fe3c02252 (diff)
x86/PCI: MMCONFIG: simplify tests for empty pci_mmcfg_config table
We never set pci_mmcfg_config unless we increment pci_mmcfg_config_num, so there's no need to test both pci_mmcfg_config_num and pci_mmcfg_config. Reviewed-by: Yinghai Lu <yinghai@kernel.org> Signed-off-by: Bjorn Helgaas <bjorn.helgaas@hp.com> Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
Diffstat (limited to 'arch/x86/pci/mmconfig-shared.c')
-rw-r--r--arch/x86/pci/mmconfig-shared.c3
1 files changed, 0 insertions, 3 deletions
diff --git a/arch/x86/pci/mmconfig-shared.c b/arch/x86/pci/mmconfig-shared.c
index 62a8ecd96980..a0cc4d2efb8a 100644
--- a/arch/x86/pci/mmconfig-shared.c
+++ b/arch/x86/pci/mmconfig-shared.c
@@ -472,7 +472,6 @@ static void __init pci_mmcfg_reject_broken(int early)
472 int i; 472 int i;
473 473
474 if ((pci_mmcfg_config_num == 0) || 474 if ((pci_mmcfg_config_num == 0) ||
475 (pci_mmcfg_config == NULL) ||
476 (pci_mmcfg_config[0].address == 0)) 475 (pci_mmcfg_config[0].address == 0))
477 return; 476 return;
478 477
@@ -618,7 +617,6 @@ static void __init __pci_mmcfg_init(int early)
618 pci_mmcfg_reject_broken(early); 617 pci_mmcfg_reject_broken(early);
619 618
620 if ((pci_mmcfg_config_num == 0) || 619 if ((pci_mmcfg_config_num == 0) ||
621 (pci_mmcfg_config == NULL) ||
622 (pci_mmcfg_config[0].address == 0)) 620 (pci_mmcfg_config[0].address == 0))
623 return; 621 return;
624 622
@@ -652,7 +650,6 @@ static int __init pci_mmcfg_late_insert_resources(void)
652 if ((pci_mmcfg_resources_inserted == 1) || 650 if ((pci_mmcfg_resources_inserted == 1) ||
653 (pci_probe & PCI_PROBE_MMCONF) == 0 || 651 (pci_probe & PCI_PROBE_MMCONF) == 0 ||
654 (pci_mmcfg_config_num == 0) || 652 (pci_mmcfg_config_num == 0) ||
655 (pci_mmcfg_config == NULL) ||
656 (pci_mmcfg_config[0].address == 0)) 653 (pci_mmcfg_config[0].address == 0))
657 return 1; 654 return 1;
658 655