diff options
Diffstat (limited to 'kernel')
-rw-r--r-- | kernel/posix-cpu-timers.c | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/kernel/posix-cpu-timers.c b/kernel/posix-cpu-timers.c index b15462b17a58..2f86424fa515 100644 --- a/kernel/posix-cpu-timers.c +++ b/kernel/posix-cpu-timers.c | |||
@@ -576,17 +576,15 @@ static void arm_timer(struct k_itimer *timer, union cpu_time_count now) | |||
576 | listpos = head; | 576 | listpos = head; |
577 | if (CPUCLOCK_WHICH(timer->it_clock) == CPUCLOCK_SCHED) { | 577 | if (CPUCLOCK_WHICH(timer->it_clock) == CPUCLOCK_SCHED) { |
578 | list_for_each_entry(next, head, entry) { | 578 | list_for_each_entry(next, head, entry) { |
579 | if (next->expires.sched > nt->expires.sched) { | 579 | if (next->expires.sched > nt->expires.sched) |
580 | listpos = &next->entry; | ||
581 | break; | 580 | break; |
582 | } | 581 | listpos = &next->entry; |
583 | } | 582 | } |
584 | } else { | 583 | } else { |
585 | list_for_each_entry(next, head, entry) { | 584 | list_for_each_entry(next, head, entry) { |
586 | if (cputime_gt(next->expires.cpu, nt->expires.cpu)) { | 585 | if (cputime_gt(next->expires.cpu, nt->expires.cpu)) |
587 | listpos = &next->entry; | ||
588 | break; | 586 | break; |
589 | } | 587 | listpos = &next->entry; |
590 | } | 588 | } |
591 | } | 589 | } |
592 | list_add(&nt->entry, listpos); | 590 | list_add(&nt->entry, listpos); |