[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <1611568045-121839-1-git-send-email-abaci-bugfix@linux.alibaba.com>
Date: Mon, 25 Jan 2021 17:47:22 +0800
From: Yang Li <abaci-bugfix@...ux.alibaba.com>
To: davem@...emloft.net
Cc: kuba@...nel.org, rajur@...lsio.com, netdev@...r.kernel.org,
linux-kernel@...r.kernel.org,
Yang Li <abaci-bugfix@...ux.alibaba.com>
Subject: [PATCH 1/4] cxgb4: remove redundant NULL check
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@...ux.alibaba.com>
Signed-off-by: Yang Li <abaci-bugfix@...ux.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
Powered by blists - more mailing lists