diff --git a/hw/hpet.c b/hw/hpet.c index 7df2d0515a..c7945ecded 100644 --- a/hw/hpet.c +++ b/hw/hpet.c @@ -411,7 +411,7 @@ static void hpet_ram_writel(void *opaque, target_phys_addr_t addr, (timer->config & HPET_TN_SETVAL)) timer->cmp = (timer->cmp & 0xffffffff00000000ULL) | new_val; - else { + if (timer_is_periodic(timer)) { /* * FIXME: Clamp period to reasonable min value? * Clamp period to reasonable max value