diff options
Diffstat (limited to 'kernel/hrtimer.c')
-rw-r--r-- | kernel/hrtimer.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/kernel/hrtimer.c b/kernel/hrtimer.c index 11e89690382..2391745f656 100644 --- a/kernel/hrtimer.c +++ b/kernel/hrtimer.c | |||
@@ -887,10 +887,13 @@ static void __remove_hrtimer(struct hrtimer *timer, | |||
887 | struct hrtimer_clock_base *base, | 887 | struct hrtimer_clock_base *base, |
888 | unsigned long newstate, int reprogram) | 888 | unsigned long newstate, int reprogram) |
889 | { | 889 | { |
890 | struct timerqueue_node *next_timer; | ||
890 | if (!(timer->state & HRTIMER_STATE_ENQUEUED)) | 891 | if (!(timer->state & HRTIMER_STATE_ENQUEUED)) |
891 | goto out; | 892 | goto out; |
892 | 893 | ||
893 | if (&timer->node == timerqueue_getnext(&base->active)) { | 894 | next_timer = timerqueue_getnext(&base->active); |
895 | timerqueue_del(&base->active, &timer->node); | ||
896 | if (&timer->node == next_timer) { | ||
894 | #ifdef CONFIG_HIGH_RES_TIMERS | 897 | #ifdef CONFIG_HIGH_RES_TIMERS |
895 | /* Reprogram the clock event device. if enabled */ | 898 | /* Reprogram the clock event device. if enabled */ |
896 | if (reprogram && hrtimer_hres_active()) { | 899 | if (reprogram && hrtimer_hres_active()) { |
@@ -903,7 +906,6 @@ static void __remove_hrtimer(struct hrtimer *timer, | |||
903 | } | 906 | } |
904 | #endif | 907 | #endif |
905 | } | 908 | } |
906 | timerqueue_del(&base->active, &timer->node); | ||
907 | if (!timerqueue_getnext(&base->active)) | 909 | if (!timerqueue_getnext(&base->active)) |
908 | base->cpu_base->active_bases &= ~(1 << base->index); | 910 | base->cpu_base->active_bases &= ~(1 << base->index); |
909 | out: | 911 | out: |