]> git.karo-electronics.de Git - linux-beck.git/commitdiff
PCI/MSI: Remove unnecessary temporary variable
authorBjorn Helgaas <bhelgaas@google.com>
Tue, 23 Sep 2014 20:38:28 +0000 (14:38 -0600)
committerBjorn Helgaas <bhelgaas@google.com>
Wed, 1 Oct 2014 18:21:46 +0000 (12:21 -0600)
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>
drivers/pci/msi.c

index 6413c5a08373fdfad23cb8bbd9758c08448b534b..2f7c92c4757a33371025679e0468e21ffdaeacde 100644 (file)
@@ -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))
@@ -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);