提交 3adfb572 编写于 作者: C Christophe JAILLET 提交者: 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: NChristophe JAILLET <christophe.jaillet@wanadoo.fr>
Signed-off-by: NBjorn Helgaas <bhelgaas@google.com>
上级 4fe03955
......@@ -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,
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册