Skip to content

Commit b8483ec

Browse files
geliangtangdavem330
authored andcommitted
liquidio: use list_empty_careful in lio_list_delete_head
Use list_empty_careful() instead of open-coding. Signed-off-by: Geliang Tang <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent 6fc3e68 commit b8483ec

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/net/ethernet/cavium/liquidio/octeon_network.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -612,7 +612,7 @@ static inline struct list_head *lio_list_delete_head(struct list_head *root)
612612
{
613613
struct list_head *node;
614614

615-
if (root->prev == root && root->next == root)
615+
if (list_empty_careful(root))
616616
node = NULL;
617617
else
618618
node = root->next;

0 commit comments

Comments
 (0)