perf_events: Fix resource leak in x86 __hw_perf_event_init()
perf_events: Fix resource leak in x86 __hw_perf_event_init()

If reserve_pmc_hardware() succeeds but reserve_ds_buffers()
fails, then we need to release_pmc_hardware. It won't be done
by the destroy() callback because we return before setting it
in case of error.

Signed-off-by: Stephane Eranian <f199ae9781930a5b94b284ca2f471140752002a7@google.com>
Cc: <4fbacc2fa0ffdbb11bf1ad6925b886ebd08dd15f@kernel.org>
Cc: 3fddac958924aef220f202ca567388ddab3f14a8@infradead.org
Cc: 19a0ba370c443ba08d20b5061586430ab449ee8c@samba.org
Cc: fe08d3c717adf2ae63592e4c9aec6e3e404d8e3e@davemloft.net
Cc: e8a1bf9163cb25e93cfd6540f223b3872ea7ee55@gmail.com
Cc: 22a70fd9773e4de05b12c05075e9bcd605577f4d@amd.com
Cc: 1ea69d7141ad48c4fb08fa338ed4b637bf010d83@lists.sf.net
LKML-Reference: <1bc2111304e9b377b3c9cbebed05fd7b753f2d3e@mx.google.com>
Signed-off-by: Ingo Molnar <9dbbbf0688fedc85ad4da37637f1a64b8c718ee2@elte.hu>
--
 arch/x86/kernel/cpu/perf_event.c |    5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

TeamVee-Kanas/android_kernel_samsung_kanas,KristFoundation/Programs,KristFoundation/Programs,KristFoundation/Programs,TeamVee-Kanas/android_kernel_samsung_kanas,TeamVee-Kanas/android_kernel_samsung_kanas,KristFoundation/Programs,KristFoundation/Programs,TeamVee-Kanas/android_kernel_samsung_kanas,TeamVee-Kanas/android_kernel_samsung_kanas,KristFoundation/Programs