From: Andi Kleen Date: Thu, 28 Oct 2010 12:16:13 +0000 (+0100) Subject: Fix install_process_keyring error handling X-Git-Tag: 2.1b_release~6419 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=27d6379894be4a81984da4d48002196a83939ca9;p=platform%2Fkernel%2Fkernel-mfld-blackbay.git 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: Andi Kleen Signed-off-by: David Howells Signed-off-by: Linus Torvalds --- diff --git a/security/keys/process_keys.c b/security/keys/process_keys.c index f8e7251..504bdd2 100644 --- a/security/keys/process_keys.c +++ b/security/keys/process_keys.c @@ -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);