mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH -next] perf: fix error return code
@ 2013-04-12  3:05 Wei Yongjun
  2013-04-14 16:05 ` [tip:perf/urgent] perf: Fix " tip-bot for Wei Yongjun
  0 siblings, 1 reply; 2+ messages in thread
From: Wei Yongjun @ 2013-04-12  3:05 UTC (permalink / raw)
  To: a.p.zijlstra, paulus, mingo, acme; +Cc: yongjun_wei, linux-kernel

From: Wei Yongjun <yongjun_wei@trendmicro.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@trendmicro.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;


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2013-04-14 16:05 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-04-12  3:05 [PATCH -next] perf: fix error return code Wei Yongjun
2013-04-14 16:05 ` [tip:perf/urgent] perf: Fix " tip-bot for Wei Yongjun

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®