diff options
author | Masami Hiramatsu <masami.hiramatsu.pt@hitachi.com> | 2011-03-30 05:25:47 -0400 |
---|---|---|
committer | Arnaldo Carvalho de Melo <acme@redhat.com> | 2011-04-05 14:35:16 -0400 |
commit | f0c4801a17cb1a762bed39a6a9d5e5be33d8a340 (patch) | |
tree | 3a3d7e446748c4367d21cbddb9ce31f509d4993c /tools/perf/util/probe-finder.c | |
parent | 7d21635ac5c78abe162fb3f56b37c30bcbfa019f (diff) |
perf probe: Fix to remove redundant close
Since dwfl_end() closes given fd with dwfl, caller doesn't need to close its fd
when finishing process.
Cc: 2nddept-manager@sdl.hitachi.co.jp
Cc: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: Lin Ming <ming.m.lin@intel.com>
Cc: Peter Zijlstra <peterz@infradead.org>
LKML-Reference: <20110330092547.2132.93728.stgit@ltc236.sdl.hitachi.co.jp>
Signed-off-by: Masami Hiramatsu <masami.hiramatsu.pt@hitachi.com>
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools/perf/util/probe-finder.c')
-rw-r--r-- | tools/perf/util/probe-finder.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/tools/perf/util/probe-finder.c b/tools/perf/util/probe-finder.c index 3bcd140b4545..5473f11a9bc8 100644 --- a/tools/perf/util/probe-finder.c +++ b/tools/perf/util/probe-finder.c | |||
@@ -1455,6 +1455,7 @@ static int find_probes(int fd, struct probe_finder *pf) | |||
1455 | if (!dbg) { | 1455 | if (!dbg) { |
1456 | pr_warning("No debug information found in the vmlinux - " | 1456 | pr_warning("No debug information found in the vmlinux - " |
1457 | "please rebuild with CONFIG_DEBUG_INFO=y.\n"); | 1457 | "please rebuild with CONFIG_DEBUG_INFO=y.\n"); |
1458 | close(fd); /* Without dwfl_end(), fd isn't closed. */ | ||
1458 | return -EBADF; | 1459 | return -EBADF; |
1459 | } | 1460 | } |
1460 | 1461 | ||
@@ -1900,6 +1901,7 @@ int find_line_range(int fd, struct line_range *lr) | |||
1900 | if (!dbg) { | 1901 | if (!dbg) { |
1901 | pr_warning("No debug information found in the vmlinux - " | 1902 | pr_warning("No debug information found in the vmlinux - " |
1902 | "please rebuild with CONFIG_DEBUG_INFO=y.\n"); | 1903 | "please rebuild with CONFIG_DEBUG_INFO=y.\n"); |
1904 | close(fd); /* Without dwfl_end(), fd isn't closed. */ | ||
1903 | return -EBADF; | 1905 | return -EBADF; |
1904 | } | 1906 | } |
1905 | 1907 | ||