mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-29 11:11:45 -04:00
timer: Check failure of timer_cpu_notify() before calling init_timer_stats()
timer_cpu_notify() should return NOTIFY_OK and nothing else. Anything else would trigger a BUG_ON(). Return value of this routine is already checked correctly but is done after issuing a call to init_timer_stats(). The right order would be to check the error case first and then call init_timer_stats(). Lets do it. Signed-off-by: Viresh Kumar <[email protected]> Cc: [email protected] Cc: [email protected] Cc: [email protected] Cc: [email protected] Link: http://lkml.kernel.org/r/c439f5b6bbc2047e1662f4d523350531425bcf9d.1393576981.git.viresh.kumar@linaro.org Signed-off-by: Thomas Gleixner <[email protected]>
This commit is contained in:
parent
bce1936951
commit
c24a4a3694
1 changed files with 2 additions and 2 deletions
|
|
@ -1681,9 +1681,9 @@ void __init init_timers(void)
|
|||
|
||||
err = timer_cpu_notify(&timers_nb, (unsigned long)CPU_UP_PREPARE,
|
||||
(void *)(long)smp_processor_id());
|
||||
init_timer_stats();
|
||||
|
||||
BUG_ON(err != NOTIFY_OK);
|
||||
|
||||
init_timer_stats();
|
||||
register_cpu_notifier(&timers_nb);
|
||||
open_softirq(TIMER_SOFTIRQ, run_timer_softirq);
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue