*/
static void edac_mc_workq_teardown(struct mem_ctl_info *mci)
{
- mci->op_state = OP_OFFLINE;
-
edac_stop_work(&mci->work);
}
}
/* If there IS a check routine, then we are running POLLED */
- if (mci->edac_check != NULL) {
+ if (mci->edac_check) {
/* This instance is NOW RUNNING */
mci->op_state = OP_RUNNING_POLL;
return NULL;
}
+ /* mark MCI offline: */
+ mci->op_state = OP_OFFLINE;
+
if (!del_mc_from_global_list(mci))
edac_mc_owner = NULL;
- mutex_unlock(&mem_ctls_mutex);
- /* flush workq processes */
- edac_mc_workq_teardown(mci);
+ mutex_unlock(&mem_ctls_mutex);
- /* marking MCI offline */
- mci->op_state = OP_OFFLINE;
+ if (mci->edac_check)
+ edac_mc_workq_teardown(mci);
/* remove from sysfs */
edac_remove_sysfs_mci_device(mci);
{
edac_dbg(0, "\n");
- pci->op_state = OP_OFFLINE;
-
edac_stop_work(&pci->work);
}
goto fail1;
}
- if (pci->edac_check != NULL) {
+ if (pci->edac_check) {
pci->op_state = OP_RUNNING_POLL;
edac_pci_workq_setup(pci, 1000);
mutex_unlock(&edac_pci_ctls_mutex);
- /* stop the workq timer */
- edac_pci_workq_teardown(pci);
+ if (pci->edac_check)
+ edac_pci_workq_teardown(pci);
edac_printk(KERN_INFO, EDAC_PCI,
"Removed device %d for %s %s: DEV %s\n",