perf/x86/intel/cstate: Prevent hotplug callback leak
authorThomas Gleixner <tglx@linutronix.de>
Thu, 22 Dec 2016 10:02:08 +0000 (11:02 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 9 Jan 2017 07:21:45 +0000 (08:21 +0100)
commit2abcc023a46046bce2b378715394c88fd9a6cdc7
tree8feceba438b003ee82e43988500ae825d8d89e01
parent7b9e1a16a1b080939a5fabf4441ba337246f531e
perf/x86/intel/cstate: Prevent hotplug callback leak

commit 834fcd298003c10ce450e66960c78893cb1cc4b5 upstream.

If the pmu registration fails the registered hotplug callbacks are not
removed. Wrong in any case, but fatal in case of a modular driver.

Replace the nonsensical state names with proper ones while at it.

Fixes: 77c34ef1c319 ("perf/x86/intel/cstate: Convert Intel CSTATE to hotplug state machine")
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Cc: Sebastian Siewior <bigeasy@linutronix.de>
Cc: Peter Zijlstra <peterz@infradead.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
arch/x86/events/intel/cstate.c