hv: timer: add debug information for add_timer

If a timer added more than once, assert the debug information.

Tracked-On: #1546
Signed-off-by: Li, Fei1 <fei1.li@intel.com>
This commit is contained in:
Li, Fei1 2018-10-19 23:18:21 +08:00 committed by wenlingz
parent 7ca1a7de7d
commit a43ff9ce98

View File

@ -80,6 +80,8 @@ int add_timer(struct hv_timer *timer)
return -EINVAL;
}
ASSERT(list_empty(&timer->node), "add timer again!\n");
/* limit minimal periodic timer cycle period */
if (timer->mode == TICK_MODE_PERIODIC) {
timer->period_in_cycle = max(timer->period_in_cycle,