From 40106c0f1fabf16d00851864feddcdc85441100b Mon Sep 17 00:00:00 2001 From: Sultan Alsawaf Date: Mon, 23 Aug 2021 00:47:31 -0700 Subject: [PATCH] cpuidle: lpm-levels: Only cancel the bias timer when it's used The bias timer is only started when WFI is used, so we only need to try and cancel it after leaving WFI. Signed-off-by: Sultan Alsawaf --- drivers/cpuidle/lpm-levels.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/cpuidle/lpm-levels.c b/drivers/cpuidle/lpm-levels.c index a97d739a48d7..43c48d775b80 100644 --- a/drivers/cpuidle/lpm-levels.c +++ b/drivers/cpuidle/lpm-levels.c @@ -1419,7 +1419,8 @@ exit: clusttimer_cancel(); } if (cpu->bias) { - biastimer_cancel(); + if (!idx) + biastimer_cancel(); cpu->bias = 0; } local_irq_enable();