aboutsummaryrefslogtreecommitdiff
path: root/topology.c
diff options
context:
space:
mode:
authorColin Ian King <colin.king@canonical.com>2014-02-18 08:51:30 +0100
committerZoran Markovic <zoran.markovic@linaro.org>2014-02-18 12:04:32 -0800
commitf0366cbf3c579d7906854bb98ecc1f5b2518b2ca (patch)
tree029bcad3e524e7bfeeebf3acd2a5bfbca0824596 /topology.c
parentda7cbe87d08ee391ebf67b32dec1f4470b31d28e (diff)
check s_cpu rather than s_core on memory allocation
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 <colin.king@canonical.com> Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
Diffstat (limited to 'topology.c')
-rw-r--r--topology.c2
1 files changed, 1 insertions, 1 deletions
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;