[PATCH] PCI/portdrv: Use ENOSPC instead of EIO

From: Angus Chen
Date: Wed Nov 23 2022 - 01:45:35 EST


If pcie_message_numbers can't provide the vector cap
which pme&aer&dpc requested,it should be return ENOSPC for better.

No functional change intended.

Signed-off-by: Angus Chen <angus.chen@xxxxxxxxxxxxxxx>
---
drivers/pci/pcie/portdrv_core.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/pci/pcie/portdrv_core.c b/drivers/pci/pcie/portdrv_core.c
index 1ac7fec47d6f..473a70210313 100644
--- a/drivers/pci/pcie/portdrv_core.c
+++ b/drivers/pci/pcie/portdrv_core.c
@@ -113,7 +113,7 @@ static int pcie_port_enable_irq_vec(struct pci_dev *dev, int *irqs, int mask)
nvec = pcie_message_numbers(dev, mask, &pme, &aer, &dpc);
if (nvec > nr_entries) {
pci_free_irq_vectors(dev);
- return -EIO;
+ return -ENOSPC;
}

/*
--
2.25.1