]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
tracing: Remove redundant IS_ERR() check in trace_pipe_open()
authorYash Suthar <yashsuthar983@gmail.com>
Mon, 20 Apr 2026 10:12:36 +0000 (15:42 +0530)
committerSteven Rostedt <rostedt@goodmis.org>
Thu, 21 May 2026 22:03:06 +0000 (18:03 -0400)
in trace_pipe_open() already check the IS_ERR(iter) and return early on
error,so iter after will be valid and it is safe to return 0 at end.

Link: https://patch.msgid.link/20260420101236.223919-1-yashsuthar983@gmail.com
Signed-off-by: Yash Suthar <yashsuthar983@gmail.com>
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
kernel/trace/trace_remote.c

index d6c3f94d67cd9f0406fbec22cd42f53d7d206d4b..2a6cc000ec98dcaefea2db1a37f9b7d71d45d175 100644 (file)
@@ -602,7 +602,7 @@ static int trace_pipe_open(struct inode *inode, struct file *filp)
 
        filp->private_data = iter;
 
-       return IS_ERR(iter) ? PTR_ERR(iter) : 0;
+       return 0;
 }
 
 static int trace_pipe_release(struct inode *inode, struct file *filp)