summaryrefslogtreecommitdiff
path: root/drivers/net/ethernet/cavium/liquidio
diff options
context:
space:
mode:
authorGeliang Tang <geliangtang@gmail.com>2020-06-28 13:14:13 +0300
committerDavid S. Miller <davem@davemloft.net>2020-06-29 07:46:33 +0300
commitb8483ecaf72ee9059dcca5de969781028a550f89 (patch)
treeb9dee8b96d88fb37f676ad572f35be7ace1560f5 /drivers/net/ethernet/cavium/liquidio
parent6fc3e68f5b35c4861b28733fa32f636db7188746 (diff)
downloadlinux-b8483ecaf72ee9059dcca5de969781028a550f89.tar.xz
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>
Diffstat (limited to 'drivers/net/ethernet/cavium/liquidio')
-rw-r--r--drivers/net/ethernet/cavium/liquidio/octeon_network.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/ethernet/cavium/liquidio/octeon_network.h b/drivers/net/ethernet/cavium/liquidio/octeon_network.h
index 50201fc86dcf..ebe56bd8849b 100644
--- a/drivers/net/ethernet/cavium/liquidio/octeon_network.h
+++ b/drivers/net/ethernet/cavium/liquidio/octeon_network.h
@@ -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;