Re: [PATCH v1] perf branch: Avoid incrementing NULL

From: Namhyung Kim

Date: Sat Mar 14 2026 - 13:46:34 EST


On Thu, Mar 12, 2026 at 03:31:31PM -0700, Ian Rogers wrote:
> If the entry is NULL the value is meaningless so early return NULL to
> avoid an increment of NULL. This was happening in calls from
> has_stitched_lbr when running the "perf record LBR tests". The return
> value isn't used in that case, so returning NULL as no effect.
>
> Fixes: 42bbabed09ce ("perf tools: Add hw_idx in struct branch_stack")
> Signed-off-by: Ian Rogers <irogers@xxxxxxxxxx>

Applied to perf-tools-next, thanks!

Best regards,
Namhyung