diff options
author | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2020-03-23 10:04:08 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2020-03-23 10:04:08 +0300 |
commit | d2e971d884e7b7e65162788b8f3b7801cd8bc137 (patch) | |
tree | 5f95f2e0e98d4181c50301e6dfa39cc87aa1c17a /tools/perf/util/env.c | |
parent | e79220db6349344b6e770f0cae7e26d8636c1440 (diff) | |
parent | 16fbf79b0f83bc752cee8589279f1ebfe57b3b6e (diff) | |
download | linux-d2e971d884e7b7e65162788b8f3b7801cd8bc137.tar.xz |
Merge 5.6-rc7 into usb-next
We need the USB fixes in here as well.
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'tools/perf/util/env.c')
-rw-r--r-- | tools/perf/util/env.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/tools/perf/util/env.c b/tools/perf/util/env.c index 6242a9215df7..4154f944f474 100644 --- a/tools/perf/util/env.c +++ b/tools/perf/util/env.c @@ -343,11 +343,11 @@ static const char *normalize_arch(char *arch) const char *perf_env__arch(struct perf_env *env) { - struct utsname uts; char *arch_name; if (!env || !env->arch) { /* Assume local operation */ - if (uname(&uts) < 0) + static struct utsname uts = { .machine[0] = '\0', }; + if (uts.machine[0] == '\0' && uname(&uts) < 0) return NULL; arch_name = uts.machine; } else |