uprobes: guard trace cleanup against error pointers

Sashiko pointed out the some of the scope cleanups for free_uprobe
could get an error pointer. Handle this case in free_uprobe
to prevent a crash.

On the other hand the macro doesn't need the guard because
free_uprobe itself already does the check.

Link: https://lore.kernel.org/all/20260831150651.1134594-2-ak@kernel.org/

Assisted-by: omp:gpt-5.6-luna sashiko
Signed-off-by: Andi Kleen <ak@kernel.org>
Signed-off-by: Masami Hiramatsu (Google) <mhiramat@kernel.org>
This commit is contained in:
Andi Kleen 2026-08-31 08:04:37 -07:00 • committed by Masami Hiramatsu (Google)
commit 738ef4cd82