perf: Fix check at end of event search

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>
This commit is contained in:
Dan Carpenter 2010-03-20 17:39:11 +03:00 committed by Steven Rostedt
parent 4778e0e8c6
commit d9f599e1e6
1 changed files with 1 additions and 1 deletions

View 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;