Skip to content

Commit 5ec0940

Browse files
committed
PCI/MSI: Remove unnecessary temporary variable
The only use of "status" is to hold a value which is immediately returned, so just return and remove the variable directly. Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
1 parent 56b72b4 commit 5ec0940

1 file changed

Lines changed: 2 additions & 3 deletions

File tree

‎drivers/pci/msi.c‎

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -920,7 +920,7 @@ EXPORT_SYMBOL(pci_msix_vec_count);
920920
**/
921921
int pci_enable_msix(struct pci_dev *dev, struct msix_entry *entries, int nvec)
922922
{
923-
int status, nr_entries;
923+
int nr_entries;
924924
int i, j;
925925

926926
if (!pci_msi_supported(dev, nvec))
@@ -951,8 +951,7 @@ int pci_enable_msix(struct pci_dev *dev, struct msix_entry *entries, int nvec)
951951
dev_info(&dev->dev, "can't enable MSI-X (MSI IRQ already assigned)\n");
952952
return -EINVAL;
953953
}
954-
status = msix_capability_init(dev, entries, nvec);
955-
return status;
954+
return msix_capability_init(dev, entries, nvec);
956955
}
957956
EXPORT_SYMBOL(pci_enable_msix);
958957

0 commit comments

Comments
 (0)