KEYS: Fix an error code in request_master_key()
authorDan Carpenter <dan.carpenter@oracle.com>
Thu, 9 Feb 2017 17:17:52 +0000 (17:17 +0000)
committerWilly Tarreau <w@1wt.eu>
Thu, 2 Nov 2017 06:16:30 +0000 (07:16 +0100)
commit98b9e94ba66c9907ff8f7276c6f9bb71cce1c4ae
tree2493d5c01b07be2431d529ea185c568ffc75cb1c
parentfe77accbd15d54708f5f4f23b585f6ca6225f9a4
KEYS: Fix an error code in request_master_key()

commit 57cb17e764ba0aaa169d07796acce54ccfbc6cae upstream.

This function has two callers and neither are able to handle a NULL
return.  Really, -EINVAL is the correct thing return here anyway.  This
fixes some static checker warnings like:

security/keys/encrypted-keys/encrypted.c:709 encrypted_key_decrypt()
error: uninitialized symbol 'master_key'.

Fixes: 7e70cb497850 ("keys: add new key-type encrypted")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Acked-by: Mimi Zohar <zohar@linux.vnet.ibm.com>
Signed-off-by: James Morris <james.l.morris@oracle.com>
Signed-off-by: Willy Tarreau <w@1wt.eu>
security/keys/encrypted-keys/encrypted.c