Skip to content

Commit

Permalink
x86/PCI: MMCONFIG: simplify tests for empty pci_mmcfg_config table
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Bjorn Helgaas authored and Jesse Barnes committed Nov 24, 2009
1 parent 7da7d36 commit 463a5df
Showing 1 changed file with 0 additions and 3 deletions.
3 changes: 0 additions & 3 deletions arch/x86/pci/mmconfig-shared.c
Original file line number Diff line number Diff line change
Expand Up @@ -472,7 +472,6 @@ static void __init pci_mmcfg_reject_broken(int early)
int i;

if ((pci_mmcfg_config_num == 0) ||
(pci_mmcfg_config == NULL) ||
(pci_mmcfg_config[0].address == 0))
return;

Expand Down Expand Up @@ -618,7 +617,6 @@ static void __init __pci_mmcfg_init(int early)
pci_mmcfg_reject_broken(early);

if ((pci_mmcfg_config_num == 0) ||
(pci_mmcfg_config == NULL) ||
(pci_mmcfg_config[0].address == 0))
return;

Expand Down Expand Up @@ -652,7 +650,6 @@ static int __init pci_mmcfg_late_insert_resources(void)
if ((pci_mmcfg_resources_inserted == 1) ||
(pci_probe & PCI_PROBE_MMCONF) == 0 ||
(pci_mmcfg_config_num == 0) ||
(pci_mmcfg_config == NULL) ||
(pci_mmcfg_config[0].address == 0))
return 1;

Expand Down

0 comments on commit 463a5df

Please sign in to comment.