PCI/MSI: Return failure when msix_setup_entries() fails
authorChristophe JAILLET <christophe.jaillet@wanadoo.fr>
Fri, 27 Jan 2017 15:14:53 +0000 (16:14 +0100)
committerBjorn Helgaas <helgaas@kernel.org>
Fri, 10 Feb 2017 20:10:24 +0000 (14:10 -0600)
commit3adfb572f2978a980b250a9e1a56f84f3a031001
tree6aaa22aea5c33a8442d99f8c7c26cacec1d005fc
parent4fe0395550aeb6709ea5332f46de3644aef7d328
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>
drivers/pci/msi.c