Message ID | 20231121183643.249006-8-helgaas@kernel.org (mailing list archive) |
---|---|
State | Accepted |
Commit | a7fde4d2156f0d7625e361741042985052d4f00e |
Delegated to: | Bjorn Helgaas |
Headers | show |
Series | x86/pci: Work around lack of ECAM space reservation | expand |
diff --git a/arch/x86/pci/mmconfig-shared.c b/arch/x86/pci/mmconfig-shared.c index b36c10e86505..459e95782bb1 100644 --- a/arch/x86/pci/mmconfig-shared.c +++ b/arch/x86/pci/mmconfig-shared.c @@ -786,6 +786,10 @@ int pci_mmconfig_insert(struct device *dev, u16 seg, u8 start, u8 end, return -EEXIST; } + /* + * Don't move earlier; we must return -EEXIST, not -EINVAL, if + * pci_mmconfig_lookup() finds something + */ if (!addr) { mutex_unlock(&pci_mmcfg_lock); return -EINVAL;