summaryrefslogtreecommitdiff
path: root/drivers/edac/edac_pci.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/edac/edac_pci.c')
-rw-r--r--drivers/edac/edac_pci.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/drivers/edac/edac_pci.c b/drivers/edac/edac_pci.c
index dd370f9..ce1e97f 100644
--- a/drivers/edac/edac_pci.c
+++ b/drivers/edac/edac_pci.c
@@ -392,6 +392,7 @@ EXPORT_SYMBOL_GPL(edac_pci_add_device);
struct edac_pci_ctl_info *edac_pci_del_device(struct device *dev)
{
struct edac_pci_ctl_info *pci;
+ int op_state;
edac_dbg(0, "\n");
@@ -406,6 +407,8 @@ struct edac_pci_ctl_info *edac_pci_del_device(struct device *dev)
return NULL;
}
+ op_state = pci->op_state;
+
pci->op_state = OP_OFFLINE;
del_edac_pci_from_global_list(pci);
@@ -413,7 +416,8 @@ struct edac_pci_ctl_info *edac_pci_del_device(struct device *dev)
mutex_unlock(&edac_pci_ctls_mutex);
/* stop the workq timer */
- edac_pci_workq_teardown(pci);
+ if (op_state == OP_RUNNING_POLL)
+ edac_pci_workq_teardown(pci);
edac_printk(KERN_INFO, EDAC_PCI,
"Removed device %d for %s %s: DEV %s\n",