Thread (3 messages) read the whole thread 3 messages, 2 authors, 2017-08-28
STALE3262d

[PATCH] net/enic:fix no return value bug

From: Rongqiang XIE <hidden>
Date: 2017-08-23 08:50:50
Subsystem: networking drivers, the rest · Maintainers: Andrew Lunn, "David S. Miller", Eric Dumazet, Jakub Kicinski, Paolo Abeni, Linus Torvalds

In enic_alloc_consistent() function, if the value mze malloc
faile, !mze is true, free the rz should return NULL.

Signed-off-by: Rongqiang XIE <redacted>
---
 drivers/net/enic/enic_main.c | 1 +
 1 file changed, 1 insertion(+)
diff --git a/drivers/net/enic/enic_main.c b/drivers/net/enic/enic_main.c
index 40dbec7..1d956cd 100644
--- a/drivers/net/enic/enic_main.c
+++ b/drivers/net/enic/enic_main.c
@@ -368,6 +368,7 @@ void enic_init_vnic_resources(struct enic *enic)
 		pr_err("%s : Failed to allocate memory for memzone list\n",
 		       __func__);
 		rte_memzone_free(rz);
+		return NULL;
 	}
 
 	mze->rz = rz;
-- 
1.8.3.1
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help