diff options
author | Adrian Hunter <[email protected]> | 2014-07-17 11:43:09 +0300 |
---|---|---|
committer | Arnaldo Carvalho de Melo <[email protected]> | 2014-07-22 10:18:57 -0300 |
commit | a6f6ae99f12e8154d5cde6e8366fc228f68d6ae5 (patch) | |
tree | dac111c4ad4e20ea8f9ca570ce5f5686d03a3bf2 | |
parent | 2336ebc32676df5b794acfe0c980583ec6c05f34 (diff) |
perf tools: Fix incorrect fd error comparison
Zero is a valid fd. Error comparison should check for negative fd.
Signed-off-by: Adrian Hunter <[email protected]>
Acked-by: Jiri Olsa <[email protected]>
Cc: David Ahern <[email protected]>
Cc: Frederic Weisbecker <[email protected]>
Cc: Jiri Olsa <[email protected]>
Cc: Namhyung Kim <[email protected]>
Cc: Paul Mackerras <[email protected]>
Cc: Peter Zijlstra <[email protected]>
Cc: Stephane Eranian <[email protected]>
Link: http://lkml.kernel.org/r/[email protected]
Signed-off-by: Arnaldo Carvalho de Melo <[email protected]>
-rw-r--r-- | tools/perf/util/dso.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/perf/util/dso.c b/tools/perf/util/dso.c index fc006fed8877..28cf7476b68c 100644 --- a/tools/perf/util/dso.c +++ b/tools/perf/util/dso.c @@ -216,7 +216,7 @@ static int open_dso(struct dso *dso, struct machine *machine) { int fd = __open_dso(dso, machine); - if (fd > 0) { + if (fd >= 0) { dso__list_add(dso); /* * Check if we crossed the allowed number |