]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
ftrace: Remove an unneeded NULL check
authorDan Carpenter <dan.carpenter@oracle.com>
Wed, 12 Jul 2017 07:33:40 +0000 (10:33 +0300)
committerSteven Rostedt (VMware) <rostedt@goodmis.org>
Wed, 12 Jul 2017 13:45:42 +0000 (09:45 -0400)
"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>
kernel/trace/ftrace.c

index 4706f0ed193e2a753975aa23e23fa8f8987a9b38..5fb5b40b3ae8dfd03a19350113dc547ea5fcb9a8 100644 (file)
@@ -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;