提交 128bc5fc 编写于 作者: M Michael Ellerman 提交者: Greg Kroah-Hartman

MSI: Consolidate precondition checks

Consolidate precondition checks into a single if statement.
Signed-off-by: NMichael Ellerman <michael@ellerman.id.au>
Acked-by: NEric W. Biederman <ebiederm@xmission.com>
Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
上级 b1e2303d
......@@ -525,12 +525,7 @@ void pci_disable_msi(struct pci_dev* dev)
struct msi_desc *entry;
int default_irq;
if (!pci_msi_enable)
return;
if (!dev)
return;
if (!dev->msi_enabled)
if (!pci_msi_enable || !dev || !dev->msi_enabled)
return;
msi_set_enable(dev, 0);
......@@ -656,12 +651,7 @@ static void msix_free_all_irqs(struct pci_dev *dev)
void pci_disable_msix(struct pci_dev* dev)
{
if (!pci_msi_enable)
return;
if (!dev)
return;
if (!dev->msix_enabled)
if (!pci_msi_enable || !dev || !dev->msix_enabled)
return;
msix_set_enable(dev, 0);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册