diff options
-rw-r--r-- | drivers/pci/msi.c | 14 |
1 files changed, 2 insertions, 12 deletions
diff --git a/drivers/pci/msi.c b/drivers/pci/msi.c index d5b9b94a2ac5..b6dc69ef80a7 100644 --- a/drivers/pci/msi.c +++ b/drivers/pci/msi.c | |||
@@ -525,12 +525,7 @@ void pci_disable_msi(struct pci_dev* dev) | |||
525 | struct msi_desc *entry; | 525 | struct msi_desc *entry; |
526 | int default_irq; | 526 | int default_irq; |
527 | 527 | ||
528 | if (!pci_msi_enable) | 528 | if (!pci_msi_enable || !dev || !dev->msi_enabled) |
529 | return; | ||
530 | if (!dev) | ||
531 | return; | ||
532 | |||
533 | if (!dev->msi_enabled) | ||
534 | return; | 529 | return; |
535 | 530 | ||
536 | msi_set_enable(dev, 0); | 531 | msi_set_enable(dev, 0); |
@@ -656,12 +651,7 @@ static void msix_free_all_irqs(struct pci_dev *dev) | |||
656 | 651 | ||
657 | void pci_disable_msix(struct pci_dev* dev) | 652 | void pci_disable_msix(struct pci_dev* dev) |
658 | { | 653 | { |
659 | if (!pci_msi_enable) | 654 | if (!pci_msi_enable || !dev || !dev->msix_enabled) |
660 | return; | ||
661 | if (!dev) | ||
662 | return; | ||
663 | |||
664 | if (!dev->msix_enabled) | ||
665 | return; | 655 | return; |
666 | 656 | ||
667 | msix_set_enable(dev, 0); | 657 | msix_set_enable(dev, 0); |