Re: [PATCH] perf: evsel: Fix error handling in tp_format lookup

From: Namhyung Kim

Date: Wed Jul 15 2026 - 14:43:14 EST


On Fri, 10 Jul 2026 16:01:40 +0800, Hongling Zeng wrote:
> In evsel__tp_format(), when trace_event__tp_format*() returns an error,
> IS_ERR() checks the local variable 'tp_format', but PTR_ERR() incorrectly
> uses 'evsel->tp_format' which hasn't been assigned yet.
>
> Fix this by using PTR_ERR(tp_format) to extract the error code from the
> correct variable.
>
> [...]
Applied to perf-tools-next, thanks!

Best regards,
Namhyung