diff mbox series

[2/3] raw/ifpga: remove unnecessary null check

Message ID 20220622185158.397779-3-stephen@networkplumber.org (mailing list archive)
State Accepted
Delegated to: David Marchand
Headers show
Series more null pointer check removal | expand

Checks

Context Check Description
ci/checkpatch success coding style OK

Commit Message

Stephen Hemminger June 22, 2022, 6:51 p.m. UTC
The function rte_kvargs_free handles calling with NULL.
Found by nullfree.cocci.

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

Patch

diff --git a/drivers/raw/ifpga/ifpga_rawdev.c b/drivers/raw/ifpga/ifpga_rawdev.c
index ceb18aed8d44..8c05302a65b8 100644
--- a/drivers/raw/ifpga/ifpga_rawdev.c
+++ b/drivers/raw/ifpga/ifpga_rawdev.c
@@ -1768,8 +1768,7 @@  ifpga_vdev_parse_devargs(struct rte_devargs *devargs,
 	ret = 0;
 
 end:
-	if (kvlist)
-		rte_kvargs_free(kvlist);
+	rte_kvargs_free(kvlist);
 
 	return ret;
 }