diff mbox series

[71/82] raw/skeleton: remove unnecessary NULL checks

Message ID 20220124000518.319850-72-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:05 a.m. UTC
Remove redundant NULL pointer checks before free functions
found by nullfree.cocci

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
---
 drivers/raw/skeleton/skeleton_rawdev_test.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

Comments

Hemant Agrawal Jan. 24, 2022, 5 a.m. UTC | #1
Acked-by:  Hemant Agrawal <hemant.agrawal@nxp.com>
diff mbox series

Patch

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;
 }