RE: [patch 33/39] PCI/MSI: Sanitize MSI-X checks

From: Tian, Kevin
Date: Fri Nov 18 2022 - 02:38:58 EST


> From: Thomas Gleixner <tglx@xxxxxxxxxxxxx>
> Sent: Friday, November 11, 2022 9:55 PM
>
> @@ -785,7 +786,7 @@ int __pci_enable_msix_range(struct pci_d
> return -ENOSPC;
> }
>
> - rc = __pci_enable_msix(dev, entries, nvec, affd, flags);
> + rc = msix_capability_init(dev, entries, nvec, affd);
> if (rc == 0)
> return nvec;
>

The check in following lines doesn't make sense now:

if (rc < minvec)
return -ENOSPC;