trace: remove the dead IS_ERR() check in trace_pipe_open()
PATCH 1/1 trace: remove the dead IS_ERR() check in trace_pipe_open()
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.
--- kernel/trace/trace_remote.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
kernel/trace/trace_remote.c +1 -1
@@ -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)
Signature · 1 line
2.43.0
Steven Rostedt
maintainerOn Mon, 20 Apr 2026 15:42:36 +0530
Yash Suthar <[email protected]> wrote:
"remove the dead"? What is this? a horror flick? ;-)
The subsystem is "tracing" not "trace" and the first word should be capitalized. I changed the subject to:
[PATCH] tracing: Remove redundant IS_ERR() check in trace_pipe_open()
And pulled it in.
When submitting changes to a subsystem, please do a git log --no-merges to see how other commits are done in that subsystem.
Thanks,
-- Steve
Quoted 22 lines
in
trace_pipe_open()already check theIS_ERR(iter)and return early on error,so iter after will be valid and it is safe to return 0 at end.Signed-off-by Yash Suthar <[email protected]>--- kernel/trace/trace_remote.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)kernel/trace/trace_remote.c +1
-1@@ -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)