diff mbox series

[v2,39/83] event/sw: remove unnecessary NULL checks

Message ID 20220124174719.14417-40-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, 5:46 p.m. UTC
Remove redundant NULL pointer checks before free functions
found by nullfree.cocci

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
---
 drivers/event/sw/sw_evdev.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
diff mbox series

Patch

diff --git a/drivers/event/sw/sw_evdev.c b/drivers/event/sw/sw_evdev.c
index 6ae613e0f2e7..ba82a80385b6 100644
--- a/drivers/event/sw/sw_evdev.c
+++ b/drivers/event/sw/sw_evdev.c
@@ -526,8 +526,7 @@  sw_dev_configure(const struct rte_eventdev *dev)
 	 * IQ chunk references were cleaned out of the QIDs in sw_stop(), and
 	 * will be reinitialized in sw_start().
 	 */
-	if (sw->chunks)
-		rte_free(sw->chunks);
+	rte_free(sw->chunks);
 
 	sw->chunks = rte_malloc_socket(NULL,
 				       sizeof(struct sw_queue_chunk) *