Skip to content

Commit

Permalink
s390/perf: Change CPUM_CF return code in event init function
Browse files Browse the repository at this point in the history
The function perf_init_event() creates a new event and
assignes it to a PMU. This a done in a loop over all existing
PMUs. For each listed PMU the event init function is called
and if this function does return any other error than -ENOENT,
the loop is terminated the creation of the event fails.

If the event is invalid, return -ENOENT to try other PMUs.

Signed-off-by: Thomas Richter <[email protected]>
Reviewed-by: Hendrik Brueckner <[email protected]>
Signed-off-by: Martin Schwidefsky <[email protected]>
  • Loading branch information
Thomas Richter authored and Martin Schwidefsky committed Nov 8, 2018
1 parent 02522ad commit 0bb2ae1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion arch/s390/kernel/perf_cpum_cf.c
Original file line number Diff line number Diff line change
Expand Up @@ -373,7 +373,7 @@ static int __hw_perf_event_init(struct perf_event *event)
return -ENOENT;

if (ev > PERF_CPUM_CF_MAX_CTR)
return -EINVAL;
return -ENOENT;

/* Obtain the counter set to which the specified counter belongs */
set = get_counter_set(ev);
Expand Down

0 comments on commit 0bb2ae1

Please sign in to comment.