Dan Carpenter schrieb: > The original code doesn't work because "call" is never NULL there. > > Signed-off-by: Dan Carpenter <error27@xxxxxxxxx> > --- > The original patch was fine, but this version is more tasteful. ;) > > diff --git a/kernel/trace/trace_events_filter.c b/kernel/trace/trace_events_filter.c > index 4615f62..c1a263a 100644 > --- a/kernel/trace/trace_events_filter.c > +++ b/kernel/trace/trace_events_filter.c > @@ -1397,7 +1397,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; > -- Hi Dan, perhaps you can do: call.list == 0 That looks more "natural" for me. Otherwise you can use goto to break from the loop and skip over the error handling: re, wh -- To unsubscribe from this list: send the line "unsubscribe kernel-janitors" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html