diff mbox series

[v2,69/83] raw/cnxk_bphy: remove unnecessary NULL checks

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

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
---
 drivers/raw/cnxk_bphy/cnxk_bphy_cgx.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
diff mbox series

Patch

diff --git a/drivers/raw/cnxk_bphy/cnxk_bphy_cgx.c b/drivers/raw/cnxk_bphy/cnxk_bphy_cgx.c
index 0b694e1c03c3..169cbc785531 100644
--- a/drivers/raw/cnxk_bphy/cnxk_bphy_cgx.c
+++ b/drivers/raw/cnxk_bphy/cnxk_bphy_cgx.c
@@ -233,8 +233,7 @@  cnxk_bphy_cgx_fini_queues(struct cnxk_bphy_cgx *cgx)
 	unsigned int i;
 
 	for (i = 0; i < cgx->num_queues; i++) {
-		if (cgx->queues[i].rsp)
-			rte_free(cgx->queues[i].rsp);
+		rte_free(cgx->queues[i].rsp);
 	}
 
 	cgx->num_queues = 0;