1
0
Fork 0

KEYS: Return more accurate error codes

We were using the wrong variable here so the error codes weren't being returned
properly.  The original code returns -ENOKEY.

Signed-off-by: Dan Carpenter <error27@gmail.com>
Signed-off-by: David Howells <dhowells@redhat.com>
Signed-off-by: James Morris <jmorris@namei.org>
hifive-unleashed-5.1
Dan Carpenter 2010-05-17 14:42:35 +01:00 committed by James Morris
parent c80901f275
commit 4d09ec0f70
1 changed files with 3 additions and 3 deletions

View File

@ -508,7 +508,7 @@ try_again:
ret = install_thread_keyring();
if (ret < 0) {
key = ERR_PTR(ret);
key_ref = ERR_PTR(ret);
goto error;
}
goto reget_creds;
@ -526,7 +526,7 @@ try_again:
ret = install_process_keyring();
if (ret < 0) {
key = ERR_PTR(ret);
key_ref = ERR_PTR(ret);
goto error;
}
goto reget_creds;
@ -585,7 +585,7 @@ try_again:
case KEY_SPEC_GROUP_KEYRING:
/* group keyrings are not yet supported */
key = ERR_PTR(-EINVAL);
key_ref = ERR_PTR(-EINVAL);
goto error;
case KEY_SPEC_REQKEY_AUTH_KEY: