perf lock: Return proper code in report_lock_*_event
authorDavidlohr Bueso <davidlohr@hp.com>
Mon, 9 Sep 2013 02:19:14 +0000 (19:19 -0700)
committerArnaldo Carvalho de Melo <acme@redhat.com>
Wed, 9 Oct 2013 14:23:32 +0000 (11:23 -0300)
commitb33492ade49a223a666e582d0c63566609e7014b
treec1708b0d19a8d1acdce8f5560b6a4575a836ef57
parent02ad0702e54f9b82b697718e7e8662eb3f2266ee
perf lock: Return proper code in report_lock_*_event

The report_lock_*_event() functions return -1 when lock_stat_findnew(),
thread_stat_findnew() or get_seq() return NULL. These functions only
return this value when failing to allocate memory, this return -ENOMEM
instead.

Signed-off-by: Davidlohr Bueso <davidlohr@hp.com>
Cc: Aswin Chandramouleeswaran <aswin@hp.com>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Hitoshi Mitake <mitake@dcl.info.waseda.ac.jp>
Cc: Ingo Molnar <mingo@kernel.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Link: http://lkml.kernel.org/r/1378693159-8747-3-git-send-email-davidlohr@hp.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
tools/perf/builtin-lock.c