tracepoint: Don't add NULL probes
authorMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Wed, 20 Mar 2013 18:02:38 +0000 (14:02 -0400)
committerMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Wed, 20 Mar 2013 18:03:27 +0000 (14:03 -0400)
Reported-by: Sahara <keun-o.park@windriver.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
liblttng-ust/tracepoint.c

index 7de56ca0361dbbe5b55c0704cdcbe1eca44fb58a..d7293dab31697d94164f785b0aace9f9824da898 100644 (file)
@@ -143,8 +143,10 @@ tracepoint_entry_add_probe(struct tracepoint_entry *entry,
        int nr_probes = 0;
        struct tracepoint_probe *old, *new;
 
-       WARN_ON(!probe);
-
+       if (!probe) {
+               WARN_ON(1);
+               return ERR_PTR(-EINVAL);
+       }
        debug_print_probes(entry);
        old = entry->probes;
        if (old) {
This page took 0.024974 seconds and 4 git commands to generate.