perf: Fix check at end of event search
authorDan Carpenter <error27@gmail.com>
Sat, 20 Mar 2010 14:39:11 +0000 (17:39 +0300)
committerSteven Rostedt <rostedt@goodmis.org>
Thu, 6 May 2010 23:49:52 +0000 (19:49 -0400)
The original code doesn't work because "call" is never NULL there.

Signed-off-by: Dan Carpenter <error27@gmail.com>
LKML-Reference: <20100320143911.GF5331@bicker>
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
kernel/trace/trace_events_filter.c

index 88c0b6dbd7fe3828b2742fb53bceda6367443f34..58092d844a1fce94b36ecb3763ccfc0fded5d1a4 100644 (file)
@@ -1398,7 +1398,7 @@ int ftrace_profile_set_filter(struct perf_event *event, int event_id,
        }
 
        err = -EINVAL;
-       if (!call)
+       if (&call->list == &ftrace_events)
                goto out_unlock;
 
        err = -EEXIST;