Skip to content

Commit

Permalink
tracing: Deletion of an unnecessary check before iput()
Browse files Browse the repository at this point in the history
The iput() function tests whether its argument is NULL and then
returns immediately. Thus the test around the call is not needed.

This issue was detected by using the Coccinelle software.

Link: http://lkml.kernel.org/r/5468F875.7080907@users.sourceforge.net

Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
  • Loading branch information
elfring authored and rostedt committed Nov 19, 2014
1 parent 8e2e095 commit 16a8ef2
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions kernel/trace/trace_uprobe.c
Original file line number Diff line number Diff line change
Expand Up @@ -552,8 +552,7 @@ static int create_trace_uprobe(int argc, char **argv)
return ret;

fail_address_parse:
if (inode)
iput(inode);
iput(inode);

pr_info("Failed to parse address or file.\n");

Expand Down

0 comments on commit 16a8ef2

Please sign in to comment.