perf: Fix check at end of event search
Dan Carpenter [Sat, 20 Mar 2010 14:39:11 +0000 (17:39 +0300)]
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 88c0b6d..58092d8 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;