• Thomas Gleixner's avatar
    x86/perf/intel/cstate: Sanitize error handling · d29859e7
    Thomas Gleixner authored
    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: default avatarThomas Gleixner <tglx@linutronix.de>
    Signed-off-by: default avatarPeter 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.deSigned-off-by: default avatarIngo Molnar <mingo@kernel.org>
    d29859e7
cstate.c 18.8 KB