Skip to content

Commit 6804a71

Browse files
james-c-linaroacmel
authored andcommitted
perf probe: Rename err label
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>
1 parent f9c506f commit 6804a71

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

tools/perf/util/probe-event.c

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1383,20 +1383,20 @@ int parse_line_range_desc(const char *arg, struct line_range *lr)
13831383
if (p == buf) {
13841384
semantic_error("No file/function name in '%s'.\n", p);
13851385
err = -EINVAL;
1386-
goto err;
1386+
goto out;
13871387
}
13881388
*(p++) = '\0';
13891389

13901390
err = parse_line_num(&p, &lr->start, "start line");
13911391
if (err)
1392-
goto err;
1392+
goto out;
13931393

13941394
if (*p == '+' || *p == '-') {
13951395
const char c = *(p++);
13961396

13971397
err = parse_line_num(&p, &lr->end, "end line");
13981398
if (err)
1399-
goto err;
1399+
goto out;
14001400

14011401
if (c == '+') {
14021402
lr->end += lr->start;
@@ -1416,11 +1416,11 @@ int parse_line_range_desc(const char *arg, struct line_range *lr)
14161416
if (lr->start > lr->end) {
14171417
semantic_error("Start line must be smaller"
14181418
" than end line.\n");
1419-
goto err;
1419+
goto out;
14201420
}
14211421
if (*p != '\0') {
14221422
semantic_error("Tailing with invalid str '%s'.\n", p);
1423-
goto err;
1423+
goto out;
14241424
}
14251425
}
14261426

@@ -1431,15 +1431,15 @@ int parse_line_range_desc(const char *arg, struct line_range *lr)
14311431
lr->file = strdup_esq(p);
14321432
if (lr->file == NULL) {
14331433
err = -ENOMEM;
1434-
goto err;
1434+
goto out;
14351435
}
14361436
}
14371437
if (*buf != '\0')
14381438
lr->function = strdup_esq(buf);
14391439
if (!lr->function && !lr->file) {
14401440
semantic_error("Only '@*' is not allowed.\n");
14411441
err = -EINVAL;
1442-
goto err;
1442+
goto out;
14431443
}
14441444
} else if (strpbrk_esq(buf, "/."))
14451445
lr->file = strdup_esq(buf);
@@ -1448,10 +1448,10 @@ int parse_line_range_desc(const char *arg, struct line_range *lr)
14481448
else { /* Invalid name */
14491449
semantic_error("'%s' is not a valid function name.\n", buf);
14501450
err = -EINVAL;
1451-
goto err;
1451+
goto out;
14521452
}
14531453

1454-
err:
1454+
out:
14551455
free(buf);
14561456
return err;
14571457
}

0 commit comments

Comments
 (0)