Perf support: fix warnings
authorMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Sun, 5 Jun 2011 04:18:01 +0000 (00:18 -0400)
committerMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Sun, 5 Jun 2011 04:18:01 +0000 (00:18 -0400)
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
lttng-context-perf-counters.c

index ede510ecc16c726dfe76688518a1c57aa1fe816e..20d49d580760b8c4ed8cd15ce239bb6c2d77b17b 100644 (file)
@@ -107,13 +107,15 @@ int lttng_add_perf_counter_to_ctx(uint32_t type,
                                        cpu, NULL, overflow_callback);
                if (!events[cpu]) {
                        ret = -EINVAL;
-                       goto error;
+                       goto name_alloc_error;
                }
        }
 
        name_alloc = kstrdup(name, GFP_KERNEL);
-       if (!name_alloc)
+       if (!name_alloc) {
+               ret = -ENOMEM;
                goto name_alloc_error;
+       }
 
        field = lttng_append_context(ctx);
        if (!field) {
This page took 0.026819 seconds and 4 git commands to generate.