|
@@ -386,11 +386,9 @@ static inline struct list_head *sctp_list_dequeue(struct list_head *list)
|
|
{
|
|
{
|
|
struct list_head *result = NULL;
|
|
struct list_head *result = NULL;
|
|
|
|
|
|
- if (list->next != list) {
|
|
|
|
|
|
+ if (!list_empty(list)) {
|
|
result = list->next;
|
|
result = list->next;
|
|
- list->next = result->next;
|
|
|
|
- list->next->prev = list;
|
|
|
|
- INIT_LIST_HEAD(result);
|
|
|
|
|
|
+ list_del_init(result);
|
|
}
|
|
}
|
|
return result;
|
|
return result;
|
|
}
|
|
}
|