Re: [PATCH] coresight: etm3x: Remove redundant NULL check on perf event attr
From: Leo Yan
Date: Tue Oct 27 2026 - 05:31:26 EST
On Tue, Oct 27, 2026 at 09:17:06AM +0000, James Clark wrote:
> attr is derived from &event->attr, so it can never be NULL even if
> event were NULL, making the check dead code. The only caller,
> etm_enable_perf(), always passes a valid event anyway, so remove the
> check.
>
> Reported-by: Sashiko <sashiko-bot@xxxxxxxxxx>
> Closes: https://sashiko.dev/#/bug/linux-c4ca0d3c-1e98-4965-aa46-da226c756b83
> Signed-off-by: James Clark <james.clark@xxxxxxxxxx>
Reviewed-by: Leo Yan <leo.yan@xxxxxxx>