diff mbox series

[58/82] net/mvpp2: remove unnecessary NULL checks

Message ID 20220124000518.319850-59-stephen@networkplumber.org (mailing list archive)
State Superseded, archived
Delegated to: Thomas Monjalon
Headers show
Series remove unnecessary null checks | expand

Checks

Context Check Description
ci/checkpatch success coding style OK

Commit Message

Stephen Hemminger Jan. 24, 2022, 12:04 a.m. UTC
Remove redundant NULL pointer checks before free functions
found by nullfree.cocci

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
---
 drivers/net/mvpp2/mrvl_qos.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

Comments

Liron Himi Jan. 24, 2022, 7:44 a.m. UTC | #1
Reviewed-by: Liron Himi <lironh@marvell.com>

-----Original Message-----
From: Stephen Hemminger <stephen@networkplumber.org> 
Sent: Monday, 24 January 2022 02:05
To: dev@dpdk.org
Cc: Stephen Hemminger <stephen@networkplumber.org>; Liron Himi <lironh@marvell.com>
Subject: [EXT] [PATCH 58/82] net/mvpp2: remove unnecessary NULL checks

External Email

----------------------------------------------------------------------
Remove redundant NULL pointer checks before free functions found by nullfree.cocci

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
---
 drivers/net/mvpp2/mrvl_qos.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/net/mvpp2/mrvl_qos.c b/drivers/net/mvpp2/mrvl_qos.c index 99f0ee56d1a7..f43217bc589c 100644
--- a/drivers/net/mvpp2/mrvl_qos.c
+++ b/drivers/net/mvpp2/mrvl_qos.c
@@ -945,8 +945,7 @@ setup_tc(struct pp2_ppio_tc_params *param, uint8_t inqs,
 	param->num_in_qs = inqs;
 
 	/* Release old config if necessary. */
-	if (param->inqs_params)
-		rte_free(param->inqs_params);
+	rte_free(param->inqs_params);
 
 	param->inqs_params = inq_params;
 
--
2.30.2
diff mbox series

Patch

diff --git a/drivers/net/mvpp2/mrvl_qos.c b/drivers/net/mvpp2/mrvl_qos.c
index 99f0ee56d1a7..f43217bc589c 100644
--- a/drivers/net/mvpp2/mrvl_qos.c
+++ b/drivers/net/mvpp2/mrvl_qos.c
@@ -945,8 +945,7 @@  setup_tc(struct pp2_ppio_tc_params *param, uint8_t inqs,
 	param->num_in_qs = inqs;
 
 	/* Release old config if necessary. */
-	if (param->inqs_params)
-		rte_free(param->inqs_params);
+	rte_free(param->inqs_params);
 
 	param->inqs_params = inq_params;