Skip to content

Commit 16a8ef2

Browse files
elfringrostedt
authored andcommitted
tracing: Deletion of an unnecessary check before iput()
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>
1 parent 8e2e095 commit 16a8ef2

1 file changed

Lines changed: 1 addition & 2 deletions

File tree

‎kernel/trace/trace_uprobe.c‎

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -552,8 +552,7 @@ static int create_trace_uprobe(int argc, char **argv)
552552
return ret;
553553

554554
fail_address_parse:
555-
if (inode)
556-
iput(inode);
555+
iput(inode);
557556

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

0 commit comments

Comments
 (0)