summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDan Carpenter <dan.carpenter@oracle.com>2017-07-12 09:33:40 +0200
committerSteven Rostedt (VMware) <rostedt@goodmis.org>2017-07-12 15:45:42 +0200
commit44925dfff05fd1a897992d278b15a6b6b55e79a7 (patch)
tree20b0385de0e91d15378eb5d43a564043a7ee8315
parentftrace: Hide cached module code for !CONFIG_MODULES (diff)
downloadlinux-44925dfff05fd1a897992d278b15a6b6b55e79a7.tar.xz
linux-44925dfff05fd1a897992d278b15a6b6b55e79a7.zip
ftrace: Remove an unneeded NULL check
"func" can't be NULL and it doesn't make sense to check because we've already derefenced it. Link: http://lkml.kernel.org/r/20170712073340.4enzeojeoupuds5a@mwanda Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Steven Rostedt (VMware) <rostedt@goodmis.org>
-rw-r--r--kernel/trace/ftrace.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/kernel/trace/ftrace.c b/kernel/trace/ftrace.c
index 4706f0ed193e..5fb5b40b3ae8 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;