Message ID | 1456479154-136027-30-git-send-email-wangnan0@huawei.com |
---|---|
State | Accepted |
Commit | 95c365617aa37878592f2f1c6c64e1abb19f0d4a |
Headers | show |
diff --git a/tools/perf/builtin-record.c b/tools/perf/builtin-record.c index a2de15b..fa16099 100644 --- a/tools/perf/builtin-record.c +++ b/tools/perf/builtin-record.c @@ -363,7 +363,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; }