when 'periodic_period' is zero, there is no need to initialize 'now'.
Signed-off-by: Baodong Chen <chenbaodong@mxnavi.com>
Acked-by: Dario Faggioli <dfaggioli@suse.com>
static void vcpu_periodic_timer_work(struct vcpu *v)
{
- s_time_t now = NOW();
+ s_time_t now;
s_time_t periodic_next_event;
if ( v->periodic_period == 0 )
return;
+ now = NOW();
periodic_next_event = v->periodic_last_event + v->periodic_period;
if ( now >= periodic_next_event )