Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

Thomas Richter and committed by
Martin Schwidefsky
0bb2ae1b 02522ad7

+1 -1
+1 -1
arch/s390/kernel/perf_cpum_cf.c
··· 373 373 return -ENOENT; 374 374 375 375 if (ev > PERF_CPUM_CF_MAX_CTR) 376 - return -EINVAL; 376 + return -ENOENT; 377 377 378 378 /* Obtain the counter set to which the specified counter belongs */ 379 379 set = get_counter_set(ev);