Commit 3adfb572 authored by Christophe JAILLET's avatar Christophe JAILLET Committed by Bjorn Helgaas

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: e75eafb9 ("genirq/msi: Switch to new irq spreading infrastructure")
Signed-off-by: default avatarChristophe JAILLET <christophe.jaillet@wanadoo.fr>
Signed-off-by: default avatarBjorn Helgaas <bhelgaas@google.com>
parent 4fe03955
...@@ -731,7 +731,7 @@ static int msix_setup_entries(struct pci_dev *dev, void __iomem *base, ...@@ -731,7 +731,7 @@ static int msix_setup_entries(struct pci_dev *dev, void __iomem *base,
ret = 0; ret = 0;
out: out:
kfree(masks); kfree(masks);
return 0; return ret;
} }
static void msix_program_entries(struct pci_dev *dev, static void msix_program_entries(struct pci_dev *dev,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment