summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--drivers/edac/edac_device.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/edac/edac_device.c b/drivers/edac/edac_device.c
index 27884ff645d8..47e5078292c4 100644
--- a/drivers/edac/edac_device.c
+++ b/drivers/edac/edac_device.c
@@ -411,6 +411,8 @@ void edac_device_workq_setup(struct edac_device_ctl_info *edac_dev,
* to used in the time period calculation
* then calc the number of jiffies that represents
*/
+ if (!msec)
+ msec = 1000;
edac_dev->poll_msec = msec;
edac_dev->delay = msecs_to_jiffies(msec);
@@ -530,7 +532,7 @@ int edac_device_add_device(struct edac_device_ctl_info *edac_dev)
* enable workq processing on this instance,
* default = 1000 msec
*/
- edac_device_workq_setup(edac_dev, 1000);
+ edac_device_workq_setup(edac_dev, edac_dev->poll_msec);
} else {
edac_dev->op_state = OP_RUNNING_INTERRUPT;
}