diff options
Diffstat (limited to 'arch/x86/kernel/cpu/perf_event.c')
-rw-r--r-- | arch/x86/kernel/cpu/perf_event.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/arch/x86/kernel/cpu/perf_event.c b/arch/x86/kernel/cpu/perf_event.c index 640891014b2..ff0e8d49875 100644 --- a/arch/x86/kernel/cpu/perf_event.c +++ b/arch/x86/kernel/cpu/perf_event.c | |||
@@ -588,7 +588,7 @@ done: | |||
588 | x86_pmu.put_event_constraints(cpuc, cpuc->event_list[i]); | 588 | x86_pmu.put_event_constraints(cpuc, cpuc->event_list[i]); |
589 | } | 589 | } |
590 | } | 590 | } |
591 | return num ? -ENOSPC : 0; | 591 | return num ? -EINVAL : 0; |
592 | } | 592 | } |
593 | 593 | ||
594 | /* | 594 | /* |
@@ -607,7 +607,7 @@ static int collect_events(struct cpu_hw_events *cpuc, struct perf_event *leader, | |||
607 | 607 | ||
608 | if (is_x86_event(leader)) { | 608 | if (is_x86_event(leader)) { |
609 | if (n >= max_count) | 609 | if (n >= max_count) |
610 | return -ENOSPC; | 610 | return -EINVAL; |
611 | cpuc->event_list[n] = leader; | 611 | cpuc->event_list[n] = leader; |
612 | n++; | 612 | n++; |
613 | } | 613 | } |
@@ -620,7 +620,7 @@ static int collect_events(struct cpu_hw_events *cpuc, struct perf_event *leader, | |||
620 | continue; | 620 | continue; |
621 | 621 | ||
622 | if (n >= max_count) | 622 | if (n >= max_count) |
623 | return -ENOSPC; | 623 | return -EINVAL; |
624 | 624 | ||
625 | cpuc->event_list[n] = event; | 625 | cpuc->event_list[n] = event; |
626 | n++; | 626 | n++; |
@@ -1316,7 +1316,7 @@ static int validate_event(struct perf_event *event) | |||
1316 | c = x86_pmu.get_event_constraints(fake_cpuc, event); | 1316 | c = x86_pmu.get_event_constraints(fake_cpuc, event); |
1317 | 1317 | ||
1318 | if (!c || !c->weight) | 1318 | if (!c || !c->weight) |
1319 | ret = -ENOSPC; | 1319 | ret = -EINVAL; |
1320 | 1320 | ||
1321 | if (x86_pmu.put_event_constraints) | 1321 | if (x86_pmu.put_event_constraints) |
1322 | x86_pmu.put_event_constraints(fake_cpuc, event); | 1322 | x86_pmu.put_event_constraints(fake_cpuc, event); |
@@ -1341,7 +1341,7 @@ static int validate_group(struct perf_event *event) | |||
1341 | { | 1341 | { |
1342 | struct perf_event *leader = event->group_leader; | 1342 | struct perf_event *leader = event->group_leader; |
1343 | struct cpu_hw_events *fake_cpuc; | 1343 | struct cpu_hw_events *fake_cpuc; |
1344 | int ret = -ENOSPC, n; | 1344 | int ret = -EINVAL, n; |
1345 | 1345 | ||
1346 | fake_cpuc = allocate_fake_cpuc(); | 1346 | fake_cpuc = allocate_fake_cpuc(); |
1347 | if (IS_ERR(fake_cpuc)) | 1347 | if (IS_ERR(fake_cpuc)) |