The hashmap__new() function never returns NULL, it returns error
pointers. Fix the error checking to match.
Fixes: d3e7cad6f36d ("perf annotate: Add a hashmap for symbol histogram")
Signed-off-by: Chen Ni <redacted>
---
tools/perf/util/annotate.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
From: Ian Rogers <irogers@google.com> Date: 2026-03-05 22:26:52
On Wed, Mar 4, 2026 at 6:18 PM Chen Ni [off-list ref] wrote:
The hashmap__new() function never returns NULL, it returns error
pointers. Fix the error checking to match.
Fixes: d3e7cad6f36d ("perf annotate: Add a hashmap for symbol histogram")
Signed-off-by: Chen Ni <redacted>
More on the ERR_PTR is a source of bugs..
Reviewed-by: Ian Rogers <irogers@google.com>
Thanks,
Ian
From: Ian Rogers <irogers@google.com> Date: 2026-03-05 22:29:38
On Thu, Mar 5, 2026 at 2:26 PM Ian Rogers [off-list ref] wrote:
On Wed, Mar 4, 2026 at 6:18 PM Chen Ni [off-list ref] wrote:
quoted
The hashmap__new() function never returns NULL, it returns error
pointers. Fix the error checking to match.
Fixes: d3e7cad6f36d ("perf annotate: Add a hashmap for symbol histogram")
Signed-off-by: Chen Ni <redacted>
More on the ERR_PTR is a source of bugs..
Reviewed-by: Ian Rogers <irogers@google.com>
Thanks,
Ian