diff options
author | Bjorn Helgaas <bhelgaas@google.com> | 2013-08-01 11:03:52 -0600 |
---|---|---|
committer | Bjorn Helgaas <bhelgaas@google.com> | 2013-08-01 11:03:52 -0600 |
commit | cbe2bb4f2bc14876ab9e1729933a7453ded250d1 (patch) | |
tree | 4662c8812671996e0f39f8ac1b6e21e700a630d7 /arch/x86/pci/mmconfig-shared.c | |
parent | 28fa60a83034fbbb74dcf4bb6025b5b28bd21ea8 (diff) | |
parent | ce1be10bf6dc8406ae773f0ac6265585a4154d37 (diff) |
Merge branch 'pci/misc' into next
* pci/misc:
PCI: Fix comment typo for pci_add_cap_save_buffer()
PCI: Return -ENOSYS for SR-IOV operations on non-SR-IOV devices
PCI: Update NumVFs register when disabling SR-IOV
x86/PCI: MMCONFIG: Check earlier for MMCONFIG region at address zero
PCI: Convert class code to use dev_groups
frv/PCI: Mark pcibios_fixup_bus() as non-init
x86/pci/mrst: Cleanup checkpatch.pl warnings
PCI: Rename "PCI Express support" kconfig title
PCI: Fix comment typo in iov.c
Diffstat (limited to 'arch/x86/pci/mmconfig-shared.c')
-rw-r--r-- | arch/x86/pci/mmconfig-shared.c | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/arch/x86/pci/mmconfig-shared.c b/arch/x86/pci/mmconfig-shared.c index 082e8812971..5596c7bdd32 100644 --- a/arch/x86/pci/mmconfig-shared.c +++ b/arch/x86/pci/mmconfig-shared.c @@ -700,7 +700,7 @@ int pci_mmconfig_insert(struct device *dev, u16 seg, u8 start, u8 end, if (!(pci_probe & PCI_PROBE_MMCONF) || pci_mmcfg_arch_init_failed) return -ENODEV; - if (start > end) + if (start > end || !addr) return -EINVAL; mutex_lock(&pci_mmcfg_lock); @@ -716,11 +716,6 @@ int pci_mmconfig_insert(struct device *dev, u16 seg, u8 start, u8 end, return -EEXIST; } - if (!addr) { - mutex_unlock(&pci_mmcfg_lock); - return -EINVAL; - } - rc = -EBUSY; cfg = pci_mmconfig_alloc(seg, start, end, addr); if (cfg == NULL) { |