Commit 27d63798 authored by Andi Kleen's avatar Andi Kleen Committed by Linus Torvalds

Fix install_process_keyring error handling

Fix an incorrect error check that returns 1 for error instead of the
expected error code.
Signed-off-by: default avatarAndi Kleen <ak@linux.intel.com>
Signed-off-by: default avatarDavid Howells <dhowells@redhat.com>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent 765aaafe
......@@ -207,7 +207,7 @@ static int install_process_keyring(void)
ret = install_process_keyring_to_cred(new);
if (ret < 0) {
abort_creds(new);
return ret != -EEXIST ?: 0;
return ret != -EEXIST ? ret : 0;
}
return commit_creds(new);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment