The Linux Kernel Mailing List
 help / color / mirror / Atom feed
* [PATCH 1/2] ftrace: remove an unneeded NULL check
@ 2017-07-12  7:33 Dan Carpenter
  2017-07-12  7:35 ` [PATCH 2/2] ftrace: silence uninitialized variable warning Dan Carpenter
  0 siblings, 1 reply; 3+ messages in thread
From: Dan Carpenter @ 2017-07-12  7:33 UTC (permalink / raw)
  To: Steven Rostedt; +Cc: Ingo Molnar, linux-kernel, kernel-janitors

"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;

^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2017-07-12 13:45 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-07-12  7:33 [PATCH 1/2] ftrace: remove an unneeded NULL check Dan Carpenter
2017-07-12  7:35 ` [PATCH 2/2] ftrace: silence uninitialized variable warning Dan Carpenter
2017-07-12 13:45   ` Steven Rostedt

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox