]> Gentwo Git Trees - linux/.git/commit
perf trace: Fix IS_ERR() vs NULL check bug
authorFushuai Wang <wangfushuai@baidu.com>
Wed, 17 Sep 2025 09:54:22 +0000 (17:54 +0800)
committerArnaldo Carvalho de Melo <acme@redhat.com>
Fri, 19 Sep 2025 15:42:07 +0000 (12:42 -0300)
commitb0f4ade163e551d0c470ead7ac57eaf373eec71a
treef2b0bf1c808e012bcc55b5dce0f765181c7028ab
parent0e9e7bc14e8f7a3b4193a8e3febb9e1e92051bd3
perf trace: Fix IS_ERR() vs NULL check bug

The alloc_syscall_stats() function always returns an error pointer
(ERR_PTR) on failure.

So replace NULL check with IS_ERR() check after calling
alloc_syscall_stats() function.

Fixes: fc00897c8a3f7f57 ("perf trace: Add --summary-mode option")
Reviewed-by: Ian Rogers <irogers@google.com>
Signed-off-by: Fushuai Wang <wangfushuai@baidu.com>
Cc: Adrian Hunter <adrian.hunter@intel.com>
Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: Jiri Olsa <jolsa@kernel.org>
Cc: Kan Liang <kan.liang@linux.intel.com>
Cc: Mark Rutland <mark.rutland@arm.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
tools/perf/builtin-trace.c