x86/perf/intel/cstate: Sanitize error handling
authorThomas Gleixner <tglx@linutronix.de>
Sun, 20 Mar 2016 18:59:03 +0000 (18:59 +0000)
committerIngo Molnar <mingo@kernel.org>
Thu, 31 Mar 2016 08:30:37 +0000 (10:30 +0200)
commitd29859e7777ebc2c8e2db6e4d8e299f50fc26414
tree44cf303b2d103181acf98877bb26f564f7c21c39
parent424646eeadab64da959f960928804e5289417819
x86/perf/intel/cstate: Sanitize error handling

There is no point in WARN_ON() inside of a well known init function. We
already know the call stack and it's really not of critical importance whether
the registration of a PMU fails.

Aside of that for consistency reasons it's just pointless to try to register
another PMU if the first register attempt failed. There is also no value in
keeping one PMU if the second one can not be registered.

Make it consistent so we can finaly modularize the driver.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
Cc: Borislav Petkov <bp@suse.de>
Cc: Jiri Olsa <jolsa@redhat.com>
Cc: Kan Liang <kan.liang@intel.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Stephane Eranian <eranian@google.com>
Cc: Vince Weaver <vincent.weaver@maine.edu>
Link: http://lkml.kernel.org/r/20160320185623.579794064@linutronix.de
Signed-off-by: Ingo Molnar <mingo@kernel.org>
arch/x86/events/intel/cstate.c