lkml.org 
[lkml]   [2013]   [May]   [9]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH 01/11] [BUGFIX] tracing: Return 0 if event_enable_func succeeded
From
Date
On Thu, 2013-05-09 at 10:31 -0400, Steven Rostedt wrote:

> > diff --git a/kernel/trace/trace_events.c b/kernel/trace/trace_events.c
> > index 53582e9..44ac836 100644
> > --- a/kernel/trace/trace_events.c
> > +++ b/kernel/trace/trace_events.c
> > @@ -2061,8 +2061,11 @@ event_enable_func(struct ftrace_hash *hash,
> > if (ret < 0)
> > goto out_put;
> > ret = register_ftrace_function_probe(glob, ops, data);
> > - if (!ret)
> > + if (!ret) {
> > + ret = -ENOENT;
> > goto out_disable;
> > + } else
> > + ret = 0;
>
> I think you meant:
>
> if (ret < 0)
> goto out_disable;
> ret = 0;
>
> Otherwise, I don't see how you fixed anything, as you still return error
> if ret is something other than zero.
>
> Or am I missing something?

Yeah, this needs a comment. register_ftrace_function_probe() returns
the number of functions enabled, but if that is zero (or less), then it
should fail. We still need to check for less than ret.

I'll fix this one up.

Thanks!

-- Steve




\
 
 \ /
  Last update: 2013-05-09 18:01    [W:0.075 / U:0.524 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site