Skip to content

Commit

Permalink
target/arm: Remove timer_del()/timer_deinit() before timer_free()
Browse files Browse the repository at this point in the history
The Arm CPU finalize function uses a sequence of timer_del(), timer_deinit(),
timer_free() to free the timer. The timer_deinit() step in this was always
unnecessary, and now the timer_del() is implied by timer_free(), so we can
collapse this down to simply calling timer_free().

Signed-off-by: Peter Maydell <[email protected]>
Reviewed-by: Philippe Mathieu-Daudé <[email protected]>
Reviewed-by: Richard Henderson <[email protected]>
Message-id: [email protected]
  • Loading branch information
pm215 committed Jan 8, 2021
1 parent 729cc68 commit 2d3bf65
Showing 1 changed file with 0 additions and 2 deletions.
2 changes: 0 additions & 2 deletions target/arm/cpu.c
Original file line number Diff line number Diff line change
Expand Up @@ -1305,8 +1305,6 @@ static void arm_cpu_finalizefn(Object *obj)
}
#ifndef CONFIG_USER_ONLY
if (cpu->pmu_timer) {
timer_del(cpu->pmu_timer);
timer_deinit(cpu->pmu_timer);
timer_free(cpu->pmu_timer);
}
#endif
Expand Down

0 comments on commit 2d3bf65

Please sign in to comment.