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

Signed-off-by: Stephen Hemminger <step...@networkplumber.org>
---
 drivers/compress/mlx5/mlx5_compress.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

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);
-- 
2.30.2

Reply via email to