[for-next][PATCH 12/21] tracing: Remove unnecessary null test before debugfs_remove()

From: Steven Rostedt
Date: Thu Jul 03 2014 - 12:17:36 EST


From: Fabian Frederick <fabf@xxxxxxxxx>

This fixes checkpatch warning:

"WARNING: debugfs_remove(NULL) is safe this check is probably not required"
Link: http://lkml.kernel.org/p/1403802871-8599-1-git-send-email-fabf@xxxxxxxxx

Signed-off-by: Fabian Frederick <fabf@xxxxxxxxx>
Signed-off-by: Steven Rostedt <rostedt@xxxxxxxxxxx>
---
kernel/trace/trace.c | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/kernel/trace/trace.c b/kernel/trace/trace.c
index eeb233cbac4f..4caa814d41c3 100644
--- a/kernel/trace/trace.c
+++ b/kernel/trace/trace.c
@@ -6071,10 +6071,8 @@ destroy_trace_option_files(struct trace_option_dentry *topts)
if (!topts)
return;

- for (cnt = 0; topts[cnt].opt; cnt++) {
- if (topts[cnt].entry)
- debugfs_remove(topts[cnt].entry);
- }
+ for (cnt = 0; topts[cnt].opt; cnt++)
+ debugfs_remove(topts[cnt].entry);

kfree(topts);
}
--
2.0.0


--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/