[PATCH 4.9 040/165] tracing: Fix tracing_stat return values in error handling paths