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

Signed-off-by: Stephen Hemminger <step...@networkplumber.org>
Acked-by:  Hemant Agrawal <hemant.agra...@nxp.com>
---
 drivers/raw/skeleton/skeleton_rawdev_test.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/drivers/raw/skeleton/skeleton_rawdev_test.c 
b/drivers/raw/skeleton/skeleton_rawdev_test.c
index 484468eeb460..693b24c415de 100644
--- a/drivers/raw/skeleton/skeleton_rawdev_test.c
+++ b/drivers/raw/skeleton/skeleton_rawdev_test.c
@@ -395,13 +395,11 @@ test_rawdev_enqdeq(void)
        RTE_TEST_ASSERT_EQUAL((unsigned int)ret, count,
                              "Unable to dequeue buffers");
 
-       if (deq_buffers)
-               free(deq_buffers);
+       free(deq_buffers);
 
        return TEST_SUCCESS;
 cleanup:
-       if (buffers[0].buf_addr)
-               free(buffers[0].buf_addr);
+       free(buffers[0].buf_addr);
 
        return TEST_FAILED;
 }
-- 
2.30.2

Reply via email to