summaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorAdrian Hunter <adrian.hunter@intel.com>2014-07-17 11:43:09 +0300
committerArnaldo Carvalho de Melo <acme@redhat.com>2014-07-22 10:18:57 -0300
commita6f6ae99f12e8154d5cde6e8366fc228f68d6ae5 (patch)
treedac111c4ad4e20ea8f9ca570ce5f5686d03a3bf2 /tools
parent2336ebc32676df5b794acfe0c980583ec6c05f34 (diff)
downloadblackbird-op-linux-a6f6ae99f12e8154d5cde6e8366fc228f68d6ae5.tar.gz
blackbird-op-linux-a6f6ae99f12e8154d5cde6e8366fc228f68d6ae5.zip
perf tools: Fix incorrect fd error comparison
Zero is a valid fd. Error comparison should check for negative fd. Signed-off-by: Adrian Hunter <adrian.hunter@intel.com> Acked-by: Jiri Olsa <jolsa@kernel.org> Cc: David Ahern <dsahern@gmail.com> Cc: Frederic Weisbecker <fweisbec@gmail.com> Cc: Jiri Olsa <jolsa@redhat.com> Cc: Namhyung Kim <namhyung@gmail.com> Cc: Paul Mackerras <paulus@samba.org> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Stephane Eranian <eranian@google.com> Link: http://lkml.kernel.org/r/1405586590-13657-2-git-send-email-adrian.hunter@intel.com Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools')
-rw-r--r--tools/perf/util/dso.c2
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
OpenPOWER on IntegriCloud