Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1685568
| From | Dan Carpenter <dan.carpenter@oracle.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | [PATCH 1/2] ftrace: remove an unneeded NULL check |
| Date | 2017-07-12 09:40 +0200 |
| Message-ID | <u2kpz-5f6-5@gated-at.bofh.it> (permalink) |
| Organization | linux.* mail to news gateway |
"func" can't be NULL and it doesn't make sense to check because we've
already derefenced it.
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
diff --git a/kernel/trace/ftrace.c b/kernel/trace/ftrace.c
index 2953d558bbee..2a3c45743f54 100644
--- a/kernel/trace/ftrace.c
+++ b/kernel/trace/ftrace.c
@@ -3950,7 +3950,7 @@ static int cache_mod(struct trace_array *tr,
continue;
/* no func matches all */
- if (!func || strcmp(func, "*") == 0 ||
+ if (strcmp(func, "*") == 0 ||
(ftrace_mod->func &&
strcmp(ftrace_mod->func, func) == 0)) {
ret = 0;
Back to linux.kernel | Previous | Next — Next in thread | Find similar | Unroll thread
[PATCH 1/2] ftrace: remove an unneeded NULL check Dan Carpenter <dan.carpenter@oracle.com> - 2017-07-12 09:40 +0200
[PATCH 2/2] ftrace: silence uninitialized variable warning Dan Carpenter <dan.carpenter@oracle.com> - 2017-07-12 09:40 +0200
Re: [PATCH 2/2] ftrace: silence uninitialized variable warning Steven Rostedt <rostedt@goodmis.org> - 2017-07-12 15:50 +0200
csiph-web