Message ID | 1454680939-24963-38-git-send-email-wangnan0@huawei.com |
---|---|
State | Superseded |
Headers | show |
diff --git a/tools/perf/builtin-record.c b/tools/perf/builtin-record.c index e6a8b31..9265948 100644 --- a/tools/perf/builtin-record.c +++ b/tools/perf/builtin-record.c @@ -362,7 +362,10 @@ try_again: } else { pr_err("failed to mmap with %d (%s)\n", errno, strerror_r(errno, msg, sizeof(msg))); - rc = -errno; + if (errno) + rc = -errno; + else + rc = -EINVAL; } goto out; }