Commit d852d394 authored by Geliang Tang's avatar Geliang Tang Committed by Thomas Gleixner

timerqueue: Use rb_entry_safe() instead of open-coding it

Signed-off-by: default avatarGeliang Tang <>
Cc: Andrew Morton <>
Cc: John Stultz <>
Link: default avatarThomas Gleixner <>
parent 9e3d6223
......@@ -80,8 +80,7 @@ bool timerqueue_del(struct timerqueue_head *head, struct timerqueue_node *node)
if (head->next == node) {
struct rb_node *rbn = rb_next(&node->node);
head->next = rbn ?
rb_entry(rbn, struct timerqueue_node, node) : NULL;
head->next = rb_entry_safe(rbn, struct timerqueue_node, node);
rb_erase(&node->node, &head->head);
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment