[PATCH 4.9 092/310] perf/core: Fix error handling in perf_event_alloc()