diff options
author | Christophe JAILLET <christophe.jaillet@wanadoo.fr> | 2017-01-27 16:14:53 +0100 |
---|---|---|
committer | Bjorn Helgaas <helgaas@kernel.org> | 2017-02-10 14:10:24 -0600 |
commit | 3adfb572f2978a980b250a9e1a56f84f3a031001 (patch) | |
tree | 6aaa22aea5c33a8442d99f8c7c26cacec1d005fc /drivers/pci/msi.c | |
parent | 4fe0395550aeb6709ea5332f46de3644aef7d328 (diff) | |
download | linux-3adfb572f2978a980b250a9e1a56f84f3a031001.tar.gz linux-3adfb572f2978a980b250a9e1a56f84f3a031001.tar.bz2 linux-3adfb572f2978a980b250a9e1a56f84f3a031001.zip |
PCI/MSI: Return failure when msix_setup_entries() fails
If alloc_msi_entry() fails, we free resources and set ret = -ENOMEM.
However, msix_setup_entries() returns 0 unconditionally. Return the error
code instead.
Fixes: e75eafb9b039 ("genirq/msi: Switch to new irq spreading infrastructure")
Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Diffstat (limited to 'drivers/pci/msi.c')
-rw-r--r-- | drivers/pci/msi.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/pci/msi.c b/drivers/pci/msi.c index b6785c8be44d..0f77b38f03dd 100644 --- a/drivers/pci/msi.c +++ b/drivers/pci/msi.c @@ -731,7 +731,7 @@ static int msix_setup_entries(struct pci_dev *dev, void __iomem *base, ret = 0; out: kfree(masks); - return 0; + return ret; } static void msix_program_entries(struct pci_dev *dev, |