]> www.infradead.org Git - users/dwmw2/linux.git/commitdiff
s390/pai_crypto: return proper error code in paicrypt_init
authorThomas Richter <tmricht@linux.ibm.com>
Mon, 22 Jan 2024 12:36:05 +0000 (13:36 +0100)
committerHeiko Carstens <hca@linux.ibm.com>
Fri, 9 Feb 2024 12:58:14 +0000 (13:58 +0100)
paicrypt_init() return incorrect error code in case the number
of PAI crypto counters is too high. Change the return code to
-E2BIG.

Please merge with d0b0efedc7fe

Reported-by: Heiko Carstens <hca@linux.ibm.com>
Signed-off-by: Thomas Richter <tmricht@linux.ibm.com>
Signed-off-by: Heiko Carstens <hca@linux.ibm.com>
arch/s390/kernel/perf_pai_crypto.c

index ffde6d5001b797b712e4a822eb2dcee62fe2651c..7e7472aee4e56bcc5d98f71f81b8bfcdd55d444f 100644 (file)
@@ -749,7 +749,7 @@ static int __init paicrypt_init(void)
                return 0;
        if (paicrypt_cnt >= PAI_CRYPTO_MAXCTR) {
                pr_err("Too many PMU pai_crypto counters %d\n", paicrypt_cnt);
-               return -1;
+               return -E2BIG;
        }
 
        rc = attr_event_init();         /* Export known PAI crypto events */