From bef96e480c8b83dc90b22803b865ad2a40bdcb67 Mon Sep 17 00:00:00 2001 From: Mathieu Desnoyers Date: Sun, 5 Jun 2011 00:18:01 -0400 Subject: [PATCH] Perf support: fix warnings Signed-off-by: Mathieu Desnoyers --- lttng-context-perf-counters.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/lttng-context-perf-counters.c b/lttng-context-perf-counters.c index ede510ec..20d49d58 100644 --- a/lttng-context-perf-counters.c +++ b/lttng-context-perf-counters.c @@ -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) { -- 2.34.1