aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/pci/pci.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/pci/pci.c')
-rw-r--r--drivers/pci/pci.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/pci/pci.c b/drivers/pci/pci.c
index 21f2ac639cab..28af496b441e 100644
--- a/drivers/pci/pci.c
+++ b/drivers/pci/pci.c
@@ -1832,7 +1832,7 @@ int pci_reset_function(struct pci_dev *dev)
1832 if (!(cap & PCI_EXP_DEVCAP_FLR)) 1832 if (!(cap & PCI_EXP_DEVCAP_FLR))
1833 return -ENOTTY; 1833 return -ENOTTY;
1834 1834
1835 if (!dev->msi_enabled && !dev->msix_enabled) 1835 if (!dev->msi_enabled && !dev->msix_enabled && dev->irq != 0)
1836 disable_irq(dev->irq); 1836 disable_irq(dev->irq);
1837 pci_save_state(dev); 1837 pci_save_state(dev);
1838 1838
@@ -1841,7 +1841,7 @@ int pci_reset_function(struct pci_dev *dev)
1841 r = pci_execute_reset_function(dev); 1841 r = pci_execute_reset_function(dev);
1842 1842
1843 pci_restore_state(dev); 1843 pci_restore_state(dev);
1844 if (!dev->msi_enabled && !dev->msix_enabled) 1844 if (!dev->msi_enabled && !dev->msix_enabled && dev->irq != 0)
1845 enable_irq(dev->irq); 1845 enable_irq(dev->irq);
1846 1846
1847 return r; 1847 return r;