Skip to content

Commit

Permalink
PCI/MSI: Remove unnecessary temporary variable
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Bjorn Helgaas committed Oct 1, 2014
1 parent 56b72b4 commit 5ec0940
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions drivers/pci/msi.c
Original file line number Diff line number Diff line change
Expand Up @@ -920,7 +920,7 @@ EXPORT_SYMBOL(pci_msix_vec_count);
**/
int pci_enable_msix(struct pci_dev *dev, struct msix_entry *entries, int nvec)
{
int status, nr_entries;
int nr_entries;
int i, j;

if (!pci_msi_supported(dev, nvec))
Expand Down Expand Up @@ -951,8 +951,7 @@ int pci_enable_msix(struct pci_dev *dev, struct msix_entry *entries, int nvec)
dev_info(&dev->dev, "can't enable MSI-X (MSI IRQ already assigned)\n");
return -EINVAL;
}
status = msix_capability_init(dev, entries, nvec);
return status;
return msix_capability_init(dev, entries, nvec);
}
EXPORT_SYMBOL(pci_enable_msix);

Expand Down

0 comments on commit 5ec0940

Please sign in to comment.