[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAPgLHd8j_fWcgqe=KLWjpBj+=o0Pw6Z-SEq=NTPU08c2w1tngQ@mail.gmail.com>
Date: Fri, 12 Apr 2013 11:05:54 +0800
From: Wei Yongjun <weiyj.lk@...il.com>
To: a.p.zijlstra@...llo.nl, paulus@...ba.org, mingo@...hat.com,
acme@...stprotocols.net
Cc: yongjun_wei@...ndmicro.com.cn, linux-kernel@...r.kernel.org
Subject: [PATCH -next] perf: fix error return code
From: Wei Yongjun <yongjun_wei@...ndmicro.com.cn>
Fix to return a negative error code from the error handling
case instead of 0, as returned elsewhere in this function.
Signed-off-by: Wei Yongjun <yongjun_wei@...ndmicro.com.cn>
---
kernel/events/core.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/kernel/events/core.c b/kernel/events/core.c
index 2427107..7504140 100644
--- a/kernel/events/core.c
+++ b/kernel/events/core.c
@@ -6033,8 +6033,10 @@ skip_type:
goto got_cpu_context;
pmu->pmu_cpu_context = alloc_percpu(struct perf_cpu_context);
- if (!pmu->pmu_cpu_context)
+ if (!pmu->pmu_cpu_context) {
+ ret = -ENOMEM;
goto free_dev;
+ }
for_each_possible_cpu(cpu) {
struct perf_cpu_context *cpuctx;
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists