mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-28 18:51:56 -04:00
perf kvm stat live: Fix perf_evlist__add_pollfd error handling
With the interface changed in following commit:
2171a92568 tools lib fd array: Allow associating an integer cookie with each entry
the perf_evlist__add_pollfd function now returns the fd position in the
pollfd array.
We need to change this function's error check condition.
Signed-off-by: Jiri Olsa <[email protected]>
Cc: Adrian Hunter <[email protected]>
Cc: Corey Ashford <[email protected]>
Cc: David Ahern <[email protected]>
Cc: Frederic Weisbecker <[email protected]>
Cc: Ingo Molnar <[email protected]>
Cc: Milian Wolff <[email protected]>
Cc: Namhyung Kim <[email protected]>
Cc: Paul Mackerras <[email protected]>
Cc: Peter Zijlstra <[email protected]>
Link: http://lkml.kernel.org/r/[email protected]
Signed-off-by: Arnaldo Carvalho de Melo <[email protected]>
This commit is contained in:
parent
cc6cd47e73
commit
fe636adda6
1 changed files with 2 additions and 2 deletions
|
|
@ -928,12 +928,12 @@ static int kvm_events_live_report(struct perf_kvm_stat *kvm)
|
|||
goto out;
|
||||
}
|
||||
|
||||
if (perf_evlist__add_pollfd(kvm->evlist, kvm->timerfd))
|
||||
if (perf_evlist__add_pollfd(kvm->evlist, kvm->timerfd) < 0)
|
||||
goto out;
|
||||
|
||||
nr_fds++;
|
||||
|
||||
if (perf_evlist__add_pollfd(kvm->evlist, fileno(stdin)))
|
||||
if (perf_evlist__add_pollfd(kvm->evlist, fileno(stdin)) < 0)
|
||||
goto out;
|
||||
|
||||
nr_stdin = nr_fds;
|
||||
|
|
|
|||
Loading…
Reference in a new issue