Message ID | 1456773727-3005-12-git-send-email-acme@kernel.org |
---|---|
State | New |
Headers | show |
diff --git a/tools/perf/builtin-record.c b/tools/perf/builtin-record.c index 46e2772f838e..515510ecc76a 100644 --- a/tools/perf/builtin-record.c +++ b/tools/perf/builtin-record.c @@ -324,7 +324,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; }