diff --git a/tools/perf/builtin-sched.c b/tools/perf/builtin-sched.c index 02e5774ca..51ba1c73a 100755 --- a/tools/perf/builtin-sched.c +++ b/tools/perf/builtin-sched.c @@ -3027,7 +3027,8 @@ static int perf_sched__timehist(struct perf_sched *sched) if (perf_time__parse_str(&sched->ptime, sched->time_str) != 0) { pr_err("Invalid time string\n"); - return -EINVAL; + err = -EINVAL; + goto out; } if (timehist_check_attr(sched, evlist) != 0)