[PATCH 4/6] check s_cpu rather than s_core on memory allocation

2014-02-18 Thread Daniel Lezcano
From: Colin Ian King 

s_cpu is not being checked for a memory allocation failure, instead
s_core is being checked.  Fix this cut-n-paste error.

Signed-off-by: Colin Ian King 
Signed-off-by: Daniel Lezcano 
---
 topology.c |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/topology.c b/topology.c
index 052ddb9..9de1354 100644
--- a/topology.c
+++ b/topology.c
@@ -128,7 +128,7 @@ int add_topo_info(struct cpu_topology *topo_list, struct 
topology_info *info)
ptr = check_exist_from_head(&s_core->cpu_head, info->cpu_id);
if (!ptr) {
s_cpu = calloc(sizeof(struct cpu_cpu), 1);
-   if (!s_core)
+   if (!s_cpu)
return -1;
 
s_cpu->cpu_id = info->cpu_id;
-- 
1.7.9.5


___
linaro-dev mailing list
linaro-dev@lists.linaro.org
http://lists.linaro.org/mailman/listinfo/linaro-dev


[PATCH 4/6] check s_cpu rather than s_core on memory allocation

2014-02-18 Thread "Daniel Lezcano
From: Colin Ian King 

s_cpu is not being checked for a memory allocation failure, instead
s_core is being checked.  Fix this cut-n-paste error.

Signed-off-by: Colin Ian King 
Signed-off-by: Daniel Lezcano 
---
 topology.c |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/topology.c b/topology.c
index 052ddb9..9de1354 100644
--- a/topology.c
+++ b/topology.c
@@ -128,7 +128,7 @@ int add_topo_info(struct cpu_topology *topo_list, struct 
topology_info *info)
ptr = check_exist_from_head(&s_core->cpu_head, info->cpu_id);
if (!ptr) {
s_cpu = calloc(sizeof(struct cpu_cpu), 1);
-   if (!s_core)
+   if (!s_cpu)
return -1;
 
s_cpu->cpu_id = info->cpu_id;
-- 
1.7.9.5


___
linaro-dev mailing list
linaro-dev@lists.linaro.org
http://lists.linaro.org/mailman/listinfo/linaro-dev