diff options
author | Thomas Richter <tmricht@linux.ibm.com> | 2018-10-29 11:11:33 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2018-11-27 18:10:49 +0300 |
commit | 850e4ca7868046e13b66cb0d656398960efc4162 (patch) | |
tree | daa53f2a81a83b1963703a47f88a6a68af5f2e64 /arch/s390 | |
parent | 615a30e8dbc9c60bb35f3687072fb077160ea0b7 (diff) | |
download | linux-850e4ca7868046e13b66cb0d656398960efc4162.tar.xz |
s390/perf: Change CPUM_CF return code in event init function
[ Upstream commit 0bb2ae1b26e1fb7543ec7474cdd374ac4b88c4da ]
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>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'arch/s390')
-rw-r--r-- | arch/s390/kernel/perf_cpum_cf.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/s390/kernel/perf_cpum_cf.c b/arch/s390/kernel/perf_cpum_cf.c index 746d03423333..61e91fee8467 100644 --- a/arch/s390/kernel/perf_cpum_cf.c +++ b/arch/s390/kernel/perf_cpum_cf.c @@ -376,7 +376,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); |