Merge tag 'trace-v5.1-2' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt...
[linux-2.6-microblaze.git] / kernel / trace / trace_uprobe.c
index 9bde07c..be78d99 100644 (file)
@@ -273,10 +273,7 @@ alloc_trace_uprobe(const char *group, const char *event, int nargs, bool is_ret)
 {
        struct trace_uprobe *tu;
 
-       if (!event || !is_good_name(event))
-               return ERR_PTR(-EINVAL);
-
-       if (!group || !is_good_name(group))
+       if (!event || !group)
                return ERR_PTR(-EINVAL);
 
        tu = kzalloc(SIZEOF_TRACE_UPROBE(nargs), GFP_KERNEL);
@@ -524,8 +521,9 @@ static int trace_uprobe_create(int argc, const char **argv)
 
        tu = alloc_trace_uprobe(group, event, argc, is_return);
        if (IS_ERR(tu)) {
-               pr_info("Failed to allocate trace_uprobe.(%d)\n", (int)PTR_ERR(tu));
                ret = PTR_ERR(tu);
+               /* This must return -ENOMEM otherwise there is a bug */
+               WARN_ON_ONCE(ret != -ENOMEM);
                goto fail_address_parse;
        }
        tu->offset = offset;