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

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

diff --git a/drivers/net/hinic/hinic_pmd_ethdev.c 
b/drivers/net/hinic/hinic_pmd_ethdev.c
index e8d9aaba84a6..35788f46eb4c 100644
--- a/drivers/net/hinic/hinic_pmd_ethdev.c
+++ b/drivers/net/hinic/hinic_pmd_ethdev.c
@@ -2662,8 +2662,7 @@ static int hinic_copy_mempool_init(struct hinic_nic_dev 
*nic_dev)
 
 static void hinic_copy_mempool_uninit(struct hinic_nic_dev *nic_dev)
 {
-       if (nic_dev->cpy_mpool != NULL)
-               rte_mempool_free(nic_dev->cpy_mpool);
+       rte_mempool_free(nic_dev->cpy_mpool);
 }
 
 static int hinic_init_sw_rxtxqs(struct hinic_nic_dev *nic_dev)
-- 
2.34.1

Reply via email to