Browse Source

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>
Markus Elfring 11 năm trước cách đây
mục cha
commit
16a8ef2751
1 tập tin đã thay đổi với 1 bổ sung2 xóa
  1. 1 2
      kernel/trace/trace_uprobe.c

+ 1 - 2
kernel/trace/trace_uprobe.c

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