diff options
Diffstat (limited to 'arch/x86/kernel')
-rw-r--r-- | arch/x86/kernel/cpu/perf_event.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/arch/x86/kernel/cpu/perf_event.c b/arch/x86/kernel/cpu/perf_event.c index 0d3466cf7f57..5dacf63f913e 100644 --- a/arch/x86/kernel/cpu/perf_event.c +++ b/arch/x86/kernel/cpu/perf_event.c | |||
@@ -472,8 +472,9 @@ static int __hw_perf_event_init(struct perf_event *event) | |||
472 | hwc->last_tag = ~0ULL; | 472 | hwc->last_tag = ~0ULL; |
473 | 473 | ||
474 | /* Processor specifics */ | 474 | /* Processor specifics */ |
475 | if (x86_pmu.hw_config(attr, hwc)) | 475 | err = x86_pmu.hw_config(attr, hwc); |
476 | return -EOPNOTSUPP; | 476 | if (err) |
477 | return err; | ||
477 | 478 | ||
478 | if (!hwc->sample_period) { | 479 | if (!hwc->sample_period) { |
479 | hwc->sample_period = x86_pmu.max_period; | 480 | hwc->sample_period = x86_pmu.max_period; |