Commit b8483eca authored by Geliang Tang's avatar Geliang Tang Committed by David S. Miller

liquidio: use list_empty_careful in lio_list_delete_head

Use list_empty_careful() instead of open-coding.
Signed-off-by: default avatarGeliang Tang <geliangtang@gmail.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 6fc3e68f
......@@ -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;
......
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