[<prev] [next>] [day] [month] [year] [list]
Message-ID: <1612923963-18222-1-git-send-email-tiantao6@hisilicon.com>
Date: Wed, 10 Feb 2021 10:26:03 +0800
From: Tian Tao <tiantao6@...ilicon.com>
To: <davem@...emloft.net>, <kuba@...nel.org>
CC: <netdev@...r.kernel.org>
Subject: [PATCH] cxgb4: fix unnecessary NULL check warnings
Remove NULL checks before vfree() to fix these warnings:
drivers/net/ethernet/chelsio/cxgb4/cudbg_lib.c:3558:2-8: WARNING: NULL
check before some freeing functions is not needed.
Signed-off-by: Tian Tao <tiantao6@...ilicon.com>
---
drivers/net/ethernet/chelsio/cxgb4/cudbg_lib.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/drivers/net/ethernet/chelsio/cxgb4/cudbg_lib.c b/drivers/net/ethernet/chelsio/cxgb4/cudbg_lib.c
index 75474f8..94eb8a6 100644
--- a/drivers/net/ethernet/chelsio/cxgb4/cudbg_lib.c
+++ b/drivers/net/ethernet/chelsio/cxgb4/cudbg_lib.c
@@ -3554,8 +3554,7 @@ int cudbg_collect_qdesc(struct cudbg_init *pdbg_init,
}
out_free:
- if (data)
- kvfree(data);
+ kvfree(data);
#undef QDESC_GET_FLQ
#undef QDESC_GET_RXQ
--
2.7.4
Powered by blists - more mailing lists