aboutsummaryrefslogtreecommitdiffstats
path: root/tools/perf/util/stat.c
diff options
context:
space:
mode:
authorArnaldo Carvalho de Melo <acme@redhat.com>2022-04-24 07:50:49 -0300
committerArnaldo Carvalho de Melo <acme@redhat.com>2022-04-24 07:50:49 -0300
commite0c1b8f9eba88173b30ba42eb492fd20582cf376 (patch)
tree2e72692a8e4998d1a9512dd105939f59e7dbe42a /tools/perf/util/stat.c
parentlibperf evsel: Factor out perf_evsel__ioctl() (diff)
parentMerge tag '5.18-rc3-ksmbd-fixes' of git://git.samba.org/ksmbd (diff)
downloadlinux-dev-e0c1b8f9eba88173b30ba42eb492fd20582cf376.tar.xz
linux-dev-e0c1b8f9eba88173b30ba42eb492fd20582cf376.zip
Merge remote-tracking branch 'torvalds/master' into perf/core
To pick up fixes, such as the llvm one for ubuntu:22.04. Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools/perf/util/stat.c')
-rw-r--r--tools/perf/util/stat.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/tools/perf/util/stat.c b/tools/perf/util/stat.c
index 924183df3da2..4a5f3b8ff820 100644
--- a/tools/perf/util/stat.c
+++ b/tools/perf/util/stat.c
@@ -1,5 +1,6 @@
// SPDX-License-Identifier: GPL-2.0
#include <errno.h>
+#include <linux/err.h>
#include <inttypes.h>
#include <math.h>
#include <string.h>
@@ -313,7 +314,7 @@ static int check_per_pkg(struct evsel *counter, struct perf_counts_values *vals,
if (!mask) {
mask = hashmap__new(pkg_id_hash, pkg_id_equal, NULL);
- if (!mask)
+ if (IS_ERR(mask))
return -ENOMEM;
counter->per_pkg_mask = mask;