tracing: Deletion of an unnecessary check before iput()
authorMarkus Elfring <elfring@users.sourceforge.net>
Sun, 16 Nov 2014 13:46:28 +0000 (14:46 +0100)
committerSteven Rostedt <rostedt@goodmis.org>
Wed, 19 Nov 2014 21:28:45 +0000 (16:28 -0500)
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>
kernel/trace/trace_uprobe.c

index fd76f8e108ef6518047491c0dde65ed17869afbd..8520acc34b185f7cb05fcbc4a2a30685dce0ef13 100644 (file)
@@ -552,8 +552,7 @@ error:
        return ret;
 
 fail_address_parse:
-       if (inode)
-               iput(inode);
+       iput(inode);
 
        pr_info("Failed to parse address or file.\n");