diff mbox series

[v2,67/83] net/vdev_netvsc: remove unnecessary NULL checks

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

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

Patch

diff --git a/drivers/net/vdev_netvsc/vdev_netvsc.c b/drivers/net/vdev_netvsc/vdev_netvsc.c
index 55f2a342c5ae..25871951685c 100644
--- a/drivers/net/vdev_netvsc/vdev_netvsc.c
+++ b/drivers/net/vdev_netvsc/vdev_netvsc.c
@@ -717,8 +717,7 @@  vdev_netvsc_vdev_probe(struct rte_vdev_device *dev)
 error:
 	++vdev_netvsc_ctx_inst;
 ignore:
-	if (kvargs)
-		rte_kvargs_free(kvargs);
+	rte_kvargs_free(kvargs);
 	/* Reset alarm if there are device context created */
 	if (vdev_netvsc_ctx_count) {
 		ret = rte_eal_alarm_set(VDEV_NETVSC_PROBE_MS * 1000,