[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20240823012737.2995688-1-liyuesong@vivo.com>
Date: Fri, 23 Aug 2024 09:27:37 +0800
From: Yuesong Li <liyuesong@...o.com>
To: mark.einon@...il.com,
davem@...emloft.net,
dumazet@...gle.com,
kuba@...nel.org,
pabeni@...hat.com,
horms@...nel.org
Cc: netdev@...r.kernel.org,
linux-kernel@...r.kernel.org,
opensource.kernel@...o.com,
Yuesong Li <liyuesong@...o.com>
Subject: [PATCH net-next v2] et131x: Remove NULL check of list_entry()
list_entry() will never return a NULL pointer, thus remove the
check.
Signed-off-by: Yuesong Li <liyuesong@...o.com>
Reviewed-by: Mark Einon <mark.einon@...il.com>
---
changes v2:
- update the short log and patch name
---
drivers/net/ethernet/agere/et131x.c | 5 -----
1 file changed, 5 deletions(-)
diff --git a/drivers/net/ethernet/agere/et131x.c b/drivers/net/ethernet/agere/et131x.c
index b325e0cef120..74fc55b9f0d9 100644
--- a/drivers/net/ethernet/agere/et131x.c
+++ b/drivers/net/ethernet/agere/et131x.c
@@ -2244,11 +2244,6 @@ static struct rfd *nic_rx_pkts(struct et131x_adapter *adapter)
element = rx_local->recv_list.next;
rfd = list_entry(element, struct rfd, list_node);
- if (!rfd) {
- spin_unlock_irqrestore(&adapter->rcv_lock, flags);
- return NULL;
- }
-
list_del(&rfd->list_node);
rx_local->num_ready_recv--;
--
2.34.1
Powered by blists - more mailing lists