From: Mathieu Desnoyers Date: Sun, 5 Jun 2011 04:18:01 +0000 (-0400) Subject: Perf support: fix warnings X-Git-Tag: v2.0-pre1~60 X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=bef96e480c8b83dc90b22803b865ad2a40bdcb67;p=lttng-modules.git Perf support: fix warnings Signed-off-by: Mathieu Desnoyers --- 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) {