diff mbox series

[26/82] compress/mlx5: remove unnecessary NULL checks

Message ID 20220124000518.319850-27-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/compress/mlx5/mlx5_compress.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
diff mbox series

Patch

diff --git a/drivers/compress/mlx5/mlx5_compress.c b/drivers/compress/mlx5/mlx5_compress.c
index 82b871bd860a..b12951da8b51 100644
--- a/drivers/compress/mlx5/mlx5_compress.c
+++ b/drivers/compress/mlx5/mlx5_compress.c
@@ -146,8 +146,7 @@  mlx5_compress_qp_release(struct rte_compressdev *dev, uint16_t qp_id)
 		void *opaq = qp->opaque_mr.addr;
 
 		mlx5_common_verbs_dereg_mr(&qp->opaque_mr);
-		if (opaq != NULL)
-			rte_free(opaq);
+		rte_free(opaq);
 	}
 	mlx5_mr_btree_free(&qp->mr_ctrl.cache_bh);
 	rte_free(qp);