diff mbox

[31/38] tick-sched: initialize 'ts' during its definition __tick_nohz_idle_enter()

Message ID 618f2788ea8cba3e40ede4c45a9b1fb662a58c59.1397492345.git.viresh.kumar@linaro.org
State New
Headers show

Commit Message

Viresh Kumar April 14, 2014, 4:23 p.m. UTC
Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
---
 kernel/time/tick-sched.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
diff mbox

Patch

diff --git a/kernel/time/tick-sched.c b/kernel/time/tick-sched.c
index 22b9505..f1bc258 100644
--- a/kernel/time/tick-sched.c
+++ b/kernel/time/tick-sched.c
@@ -792,7 +792,7 @@  static void __tick_nohz_idle_enter(struct tick_sched *ts)
  */
 void tick_nohz_idle_enter(void)
 {
-	struct tick_sched *ts;
+	struct tick_sched *ts = &__get_cpu_var(tick_cpu_sched);
 
 	WARN_ON_ONCE(irqs_disabled());
 
@@ -806,7 +806,6 @@  void tick_nohz_idle_enter(void)
 
 	local_irq_disable();
 
-	ts = &__get_cpu_var(tick_cpu_sched);
 	ts->inidle = 1;
 	__tick_nohz_idle_enter(ts);