Message ID | 1452520124-2073-42-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 aaf3b0f..b65b41f 100644 --- a/tools/perf/builtin-record.c +++ b/tools/perf/builtin-record.c @@ -361,7 +361,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; }