diff options
author | Srikar Dronamraju <srikar@linux.vnet.ibm.com> | 2012-05-31 07:46:43 -0400 |
---|---|---|
committer | Arnaldo Carvalho de Melo <acme@redhat.com> | 2012-05-31 11:08:49 -0400 |
commit | a23c4dc422cff7bd30f40f5dc7c9ac4a6339005a (patch) | |
tree | dddb728845287ef5a3f95535f845efa8f0a327ba /tools/perf/util/probe-event.c | |
parent | 378474e4b23183002f1791b294a4440b6b7df36a (diff) |
perf uprobes: Remove unnecessary check before strlist__delete
Since strlist__delete() itself checks, the additional check before
calling strlist__delete() is redundant.
No Functional change.
Signed-off-by: Srikar Dronamraju <srikar@linux.vnet.ibm.com>
Suggested-by: Arnaldo Carvalho de Melo <acme@infradead.org>
Cc: Ananth N Mavinakayanahalli <ananth@in.ibm.com>
Cc: Anton Arapov <anton@redhat.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Masami Hiramatsu <masami.hiramatsu.pt@hitachi.com>
Cc: Oleg Nesterov <oleg@redhat.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Steven Rostedt <rostedt@goodmis.org>
Link: http://lkml.kernel.org/r/20120531114643.23691.38666.sendpatchset@srdronam.in.ibm.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools/perf/util/probe-event.c')
-rw-r--r-- | tools/perf/util/probe-event.c | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/tools/perf/util/probe-event.c b/tools/perf/util/probe-event.c index 59dccc98b554..0dda25d82d06 100644 --- a/tools/perf/util/probe-event.c +++ b/tools/perf/util/probe-event.c | |||
@@ -2164,16 +2164,12 @@ int del_perf_probe_events(struct strlist *dellist) | |||
2164 | 2164 | ||
2165 | error: | 2165 | error: |
2166 | if (kfd >= 0) { | 2166 | if (kfd >= 0) { |
2167 | if (namelist) | 2167 | strlist__delete(namelist); |
2168 | strlist__delete(namelist); | ||
2169 | |||
2170 | close(kfd); | 2168 | close(kfd); |
2171 | } | 2169 | } |
2172 | 2170 | ||
2173 | if (ufd >= 0) { | 2171 | if (ufd >= 0) { |
2174 | if (unamelist) | 2172 | strlist__delete(unamelist); |
2175 | strlist__delete(unamelist); | ||
2176 | |||
2177 | close(ufd); | 2173 | close(ufd); |
2178 | } | 2174 | } |
2179 | 2175 | ||