Re: [PATCH v1] perf trace: Avoid an ERR_PTR in syscall_stats

From: Namhyung Kim

Date: Tue Mar 03 2026 - 17:19:27 EST


On Mon, 02 Mar 2026 15:45:15 -0800, Ian Rogers wrote:
> hashmap__new may return an ERR_PTR and previously this would be
> assigned to syscall_stats meaning all use of syscall_stats needs to
> test for NULL (uninitialized) or an ERR_PTR. Given the only reason
> hashmap__new can fail is ENOMEM, just use NULL to indicate the
> allocation failure and avoid the code having to test for NULL and
> IS_ERR.
>
> [...]
Applied to perf-tools-next, thanks!

Best regards,
Namhyung