diff mbox series

[v2,59/83] net/mvpp2: remove unnecessary NULL checks

Message ID 20220124174719.14417-60-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, 5:46 p.m. UTC
Remove redundant NULL pointer checks before free functions
found by nullfree.cocci

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Reviewed-by: Liron Himi <lironh@marvell.com>
---
 drivers/net/mvpp2/mrvl_qos.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
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;