[PATCH 5.15 357/476] tracing/trigger: Fix to return error if failed to alloc snapshot