]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
perf probe: Rename err label
authorJames Clark <james.clark@linaro.org>
Wed, 11 Dec 2024 08:55:24 +0000 (08:55 +0000)
committerArnaldo Carvalho de Melo <acme@redhat.com>
Tue, 14 Jan 2025 17:57:19 +0000 (14:57 -0300)
Rename err to out to avoid confusion because buf is still supposed to be
freed in non error cases.

Reviewed-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Signed-off-by: James Clark <james.clark@linaro.org>
Tested-by: Namhyung Kim <namhyung@kernel.org>
Acked-by: Masami Hiramatsu <mhiramat@kernel.org>
Cc: Adrian Hunter <adrian.hunter@intel.com>
Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Cc: Dr. David Alan Gilbert <linux@treblig.org>
Cc: Ian Rogers <irogers@google.com>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: Jiri Olsa <jolsa@kernel.org>
Cc: Kan Liang <kan.liang@linux.intel.com>
Cc: Leo Yan <leo.yan@arm.com>
Cc: Mark Rutland <mark.rutland@arm.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Link: https://lore.kernel.org/r/20241211085525.519458-3-james.clark@linaro.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
tools/perf/util/probe-event.c

index 7e002af3c3133a52320e56a26ac27c7b59ec572f..307ad6242a4e92f6c51701db025f1ba57bc2c937 100644 (file)
@@ -1383,20 +1383,20 @@ int parse_line_range_desc(const char *arg, struct line_range *lr)
                if (p == buf) {
                        semantic_error("No file/function name in '%s'.\n", p);
                        err = -EINVAL;
-                       goto err;
+                       goto out;
                }
                *(p++) = '\0';
 
                err = parse_line_num(&p, &lr->start, "start line");
                if (err)
-                       goto err;
+                       goto out;
 
                if (*p == '+' || *p == '-') {
                        const char c = *(p++);
 
                        err = parse_line_num(&p, &lr->end, "end line");
                        if (err)
-                               goto err;
+                               goto out;
 
                        if (c == '+') {
                                lr->end += lr->start;
@@ -1416,11 +1416,11 @@ int parse_line_range_desc(const char *arg, struct line_range *lr)
                if (lr->start > lr->end) {
                        semantic_error("Start line must be smaller"
                                       " than end line.\n");
-                       goto err;
+                       goto out;
                }
                if (*p != '\0') {
                        semantic_error("Tailing with invalid str '%s'.\n", p);
-                       goto err;
+                       goto out;
                }
        }
 
@@ -1431,7 +1431,7 @@ int parse_line_range_desc(const char *arg, struct line_range *lr)
                        lr->file = strdup_esq(p);
                        if (lr->file == NULL) {
                                err = -ENOMEM;
-                               goto err;
+                               goto out;
                        }
                }
                if (*buf != '\0')
@@ -1439,7 +1439,7 @@ int parse_line_range_desc(const char *arg, struct line_range *lr)
                if (!lr->function && !lr->file) {
                        semantic_error("Only '@*' is not allowed.\n");
                        err = -EINVAL;
-                       goto err;
+                       goto out;
                }
        } else if (strpbrk_esq(buf, "/."))
                lr->file = strdup_esq(buf);
@@ -1448,10 +1448,10 @@ int parse_line_range_desc(const char *arg, struct line_range *lr)
        else {  /* Invalid name */
                semantic_error("'%s' is not a valid function name.\n", buf);
                err = -EINVAL;
-               goto err;
+               goto out;
        }
 
-err:
+out:
        free(buf);
        return err;
 }