Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1686159 > unrolled thread

[for-next][PATCH 1/2] ftrace: Remove an unneeded NULL check

Started bySteven Rostedt <rostedt@goodmis.org>
First post2017-07-13 03:10 +0200
Last post2017-07-13 03:10 +0200
Articles 1 — 1 participant

Back to article view | Back to linux.kernel

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  [for-next][PATCH 1/2] ftrace: Remove an unneeded NULL check Steven Rostedt <rostedt@goodmis.org> - 2017-07-13 03:10 +0200

#1686159 — [for-next][PATCH 1/2] ftrace: Remove an unneeded NULL check

FromSteven Rostedt <rostedt@goodmis.org>
Date2017-07-13 03:10 +0200
Subject[for-next][PATCH 1/2] ftrace: Remove an unneeded NULL check
Message-ID<u2ANH-7ig-1@gated-at.bofh.it>
From: Dan Carpenter <dan.carpenter@oracle.com>

"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 | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

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

[toc] | [standalone]


Back to top | Article view | linux.kernel


csiph-web