PCI/MSI: Sanitize MSI-X checks
authorThomas Gleixner <tglx@linutronix.de>
Fri, 11 Nov 2022 13:55:07 +0000 (14:55 +0100)
committerThomas Gleixner <tglx@linutronix.de>
Thu, 17 Nov 2022 14:15:22 +0000 (15:15 +0100)
commitbab65e48cb064d67b488efb6888c06fd977a8245
tree38891b797f5ef00443d78b2528ef9e4d8e1e5d71
parent12910ffd189e23d8996e0d19b723518accf57b76
PCI/MSI: Sanitize MSI-X checks

There is no point in doing the same sanity checks over and over in a loop
during MSI-X enablement. Put them in front of the loop and return early
when they fail.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Reviewed-by: Jason Gunthorpe <jgg@nvidia.com>
Acked-by: Bjorn Helgaas <bhelgaas@google.com>
Link: https://lore.kernel.org/r/20221111122015.516946468@linutronix.de
drivers/pci/msi/msi.c