mirror of
https://github.com/tbsdtv/linux_media.git
synced 2025-07-23 12:43:29 +02:00
tracing: make tracing_init_dentry() returns an integer instead of a d_entry pointer
Current tracing_init_dentry() return a d_entry pointer, while is not necessary. This function returns NULL on success or error on failure, which means there is no valid d_entry pointer return. Let's return 0 on success and negative value for error. Link: https://lkml.kernel.org/r/20200712011036.70948-5-richard.weiyang@linux.alibaba.com Signed-off-by: Wei Yang <richard.weiyang@linux.alibaba.com> Signed-off-by: Steven Rostedt (VMware) <rostedt@goodmis.org>
This commit is contained in:
committed by
Steven Rostedt (VMware)
parent
dc300d77b8
commit
22c36b1826
@@ -1336,13 +1336,13 @@ static const struct file_operations graph_depth_fops = {
|
||||
|
||||
static __init int init_graph_tracefs(void)
|
||||
{
|
||||
struct dentry *d_tracer;
|
||||
int ret;
|
||||
|
||||
d_tracer = tracing_init_dentry();
|
||||
if (IS_ERR(d_tracer))
|
||||
ret = tracing_init_dentry();
|
||||
if (ret)
|
||||
return 0;
|
||||
|
||||
trace_create_file("max_graph_depth", 0644, d_tracer,
|
||||
trace_create_file("max_graph_depth", 0644, NULL,
|
||||
NULL, &graph_depth_fops);
|
||||
|
||||
return 0;
|
||||
|
Reference in New Issue
Block a user