linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/4] cxgb4: remove redundant NULL check
@ 2021-01-25  9:47 Yang Li
  2021-01-25  9:47 ` [PATCH 2/4] " Yang Li
                   ` (3 more replies)
  0 siblings, 4 replies; 7+ messages in thread
From: Yang Li @ 2021-01-25  9:47 UTC (permalink / raw)
  To: davem; +Cc: kuba, rajur, netdev, linux-kernel, Yang Li

Fix below warnings reported by coccicheck:
./drivers/net/ethernet/chelsio/cxgb4/clip_tbl.c:327:3-9: WARNING: NULL
check before some freeing functions is not needed.

Reported-by: Abaci Robot <abaci@linux.alibaba.com>
Signed-off-by: Yang Li <abaci-bugfix@linux.alibaba.com>
---
 drivers/net/ethernet/chelsio/cxgb4/clip_tbl.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/net/ethernet/chelsio/cxgb4/clip_tbl.c b/drivers/net/ethernet/chelsio/cxgb4/clip_tbl.c
index ce28820..12fcf84 100644
--- a/drivers/net/ethernet/chelsio/cxgb4/clip_tbl.c
+++ b/drivers/net/ethernet/chelsio/cxgb4/clip_tbl.c
@@ -323,8 +323,7 @@ void t4_cleanup_clip_tbl(struct adapter *adap)
 	struct clip_tbl *ctbl = adap->clipt;
 
 	if (ctbl) {
-		if (ctbl->cl_list)
-			kvfree(ctbl->cl_list);
+		kvfree(ctbl->cl_list);
 		kvfree(ctbl);
 	}
 }
-- 
1.8.3.1


^ permalink raw reply related	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2021-01-27  5:06 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-01-25  9:47 [PATCH 1/4] cxgb4: remove redundant NULL check Yang Li
2021-01-25  9:47 ` [PATCH 2/4] " Yang Li
2021-01-25  9:47 ` [PATCH 3/4] " Yang Li
2021-01-27  4:05   ` Raju Rangoju
2021-01-25  9:47 ` [PATCH 4/4] " Yang Li
2021-01-27  3:56   ` Raju Rangoju
2021-01-25 21:14 ` [PATCH 1/4] " Jakub Kicinski

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).