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:32:16 +0000 (08:32 +0100)
commit19d55b9f32b6888411c6d09090537dd1ddbf8025
tree448ccce921d1068f9e70bdd429ec916fdde0e2fc
parentba12b35fbd69020d1fad79f0cead0fbd9ea4822a
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