Commit-ID:  a6f6ae99f12e8154d5cde6e8366fc228f68d6ae5
Gitweb:     http://git.kernel.org/tip/a6f6ae99f12e8154d5cde6e8366fc228f68d6ae5
Author:     Adrian Hunter <[email protected]>
AuthorDate: Thu, 17 Jul 2014 11:43:09 +0300
Committer:  Arnaldo Carvalho de Melo <[email protected]>
CommitDate: Tue, 22 Jul 2014 10:18:57 -0300

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]>
---
 tools/perf/util/dso.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tools/perf/util/dso.c b/tools/perf/util/dso.c
index fc006fe..28cf747 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
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Reply via email to