tracing / synthetic: Disable events after testing in synth_event_gen_test_init()
[platform/kernel/linux-rpi.git] / kernel / trace / trace_fprobe.c
index 8bfe23a..7d2ddbc 100644 (file)
@@ -927,11 +927,12 @@ static int parse_symbol_and_return(int argc, const char *argv[],
        for (i = 2; i < argc; i++) {
                tmp = strstr(argv[i], "$retval");
                if (tmp && !isalnum(tmp[7]) && tmp[7] != '_') {
+                       if (is_tracepoint) {
+                               trace_probe_log_set_index(i);
+                               trace_probe_log_err(tmp - argv[i], RETVAL_ON_PROBE);
+                               return -EINVAL;
+                       }
                        *is_return = true;
-                       /*
-                        * NOTE: Don't check is_tracepoint here, because it will
-                        * be checked when the argument is parsed.
-                        */
                        break;
                }
        }