[PATCH] intel_idle: Fix uninitialized variable bug

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



The "tick" variable isn't initialized if "lapic_timer_always_reliable"
is true.

Fixes: 40ab82e08d78 ("intel_idle: Simplify LAPIC timer reliability checks")
Signed-off-by: Dan Carpenter <dan.carpenter@xxxxxxxxxx>
---
 drivers/idle/intel_idle.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/idle/intel_idle.c b/drivers/idle/intel_idle.c
index aae53e650638..6c9152f303a6 100644
--- a/drivers/idle/intel_idle.c
+++ b/drivers/idle/intel_idle.c
@@ -132,7 +132,7 @@ static __cpuidle int intel_idle(struct cpuidle_device *dev,
 	struct cpuidle_state *state = &drv->states[index];
 	unsigned long eax = flg2MWAIT(state->flags);
 	unsigned long ecx = 1; /* break on interrupt flag */
-	bool tick;
+	bool tick = false;
 	int cpu = smp_processor_id();
 
 	/*
-- 
2.27.0




[Index of Archives]     [Kernel Development]     [Kernel Announce]     [Kernel Newbies]     [Linux Networking Development]     [Share Photos]     [IDE]     [Security]     [Git]     [Netfilter]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Device Mapper]

  Powered by Linux