Skip to content

Commit 3ebb4e8

Browse files
elfringbwhacks
authored andcommitted
tracing: Deletion of an unnecessary check before iput()
commit 16a8ef2 upstream. 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> Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
1 parent 2e2e01b commit 3ebb4e8

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

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)