diff options
author | Yang Yingliang <yangyingliang@huawei.com> | 2023-07-28 16:42:28 +0800 |
---|---|---|
committer | Heiko Carstens <hca@linux.ibm.com> | 2023-07-29 14:57:19 +0200 |
commit | 3e8fc2d492207353c5ee469241c8df36c9765471 (patch) | |
tree | f75c950657f6ac0c93d09e7fa3ae9d4fd74f9302 /arch/s390 | |
parent | 46a923fd86eb51acfc9e833ce0a27cc09f3e1c45 (diff) | |
download | linux-stable-3e8fc2d492207353c5ee469241c8df36c9765471.tar.gz linux-stable-3e8fc2d492207353c5ee469241c8df36c9765471.tar.bz2 linux-stable-3e8fc2d492207353c5ee469241c8df36c9765471.zip |
s390/cert_store: fix error return code in fill_cs_keyring()
The 'rc' will be re-assigned to 0 after calling get_vcssb(), it
needs be set to error code if create_cs_keyring() fails.
[hca@linux.ibm.com: slightly changed coding style]
Fixes: 8cf57d7217c3 ("s390: add support for user-defined certificates")
Signed-off-by: Yang Yingliang <yangyingliang@huawei.com>
Link: https://lore.kernel.org/r/20230728084228.3186083-1-yangyingliang@huawei.com
Signed-off-by: Heiko Carstens <hca@linux.ibm.com>
Diffstat (limited to 'arch/s390')
-rw-r--r-- | arch/s390/kernel/cert_store.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/arch/s390/kernel/cert_store.c b/arch/s390/kernel/cert_store.c index 1cbeb9ce0eb1..3986a044eb36 100644 --- a/arch/s390/kernel/cert_store.c +++ b/arch/s390/kernel/cert_store.c @@ -702,6 +702,7 @@ static int fill_cs_keyring(void) if (rc) goto cleanup_keys; + rc = -ENOMEM; cs_keyring = create_cs_keyring(); if (!cs_keyring) goto cleanup_keys; |