Skip to content

Commit 0bb2ae1

Browse files
Thomas RichterMartin Schwidefsky
authored andcommitted
s390/perf: Change CPUM_CF return code in event init function
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 <tmricht@linux.ibm.com> Reviewed-by: Hendrik Brueckner <brueckner@linux.ibm.com> Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
1 parent 02522ad commit 0bb2ae1

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

arch/s390/kernel/perf_cpum_cf.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -373,7 +373,7 @@ static int __hw_perf_event_init(struct perf_event *event)
373373
return -ENOENT;
374374

375375
if (ev > PERF_CPUM_CF_MAX_CTR)
376-
return -EINVAL;
376+
return -ENOENT;
377377

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

0 commit comments

Comments
 (0)