Skip to content

Commit 3e8fc2d

Browse files
Yang Yinglianghcahca
authored andcommitted
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: 8cf57d7 ("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>
1 parent 46a923f commit 3e8fc2d

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

arch/s390/kernel/cert_store.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -702,6 +702,7 @@ static int fill_cs_keyring(void)
702702
if (rc)
703703
goto cleanup_keys;
704704

705+
rc = -ENOMEM;
705706
cs_keyring = create_cs_keyring();
706707
if (!cs_keyring)
707708
goto cleanup_keys;

0 commit comments

Comments
 (0)