[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20240822030535.1214176-1-liyuesong@vivo.com>
Date: Thu, 22 Aug 2024 11:05:35 +0800
From: Yuesong Li <liyuesong@...o.com>
To: mark.einon@...il.com,
davem@...emloft.net,
edumazet@...gle.com,
kuba@...nel.org,
pabeni@...hat.com
Cc: netdev@...r.kernel.org,
linux-kernel@...r.kernel.org,
opensource.kernel@...o.com,
Yuesong Li <liyuesong@...o.com>
Subject: [PATCH v1] driver:net: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>
---
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