liquidio: use list_empty_careful in lio_list_delete_head
Use list_empty_careful() instead of open-coding. Signed-off-by: Geliang Tang <geliangtang@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
6fc3e68f5b
commit
b8483ecaf7
|
@ -612,7 +612,7 @@ static inline struct list_head *lio_list_delete_head(struct list_head *root)
|
|||
{
|
||||
struct list_head *node;
|
||||
|
||||
if (root->prev == root && root->next == root)
|
||||
if (list_empty_careful(root))
|
||||
node = NULL;
|
||||
else
|
||||
node = root->next;
|
||||
|
|
Loading…
Reference in a new issue