From 27d6379894be4a81984da4d48002196a83939ca9 Mon Sep 17 00:00:00 2001 From: Andi Kleen Date: Thu, 28 Oct 2010 13:16:13 +0100 Subject: 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 --- security/keys/process_keys.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'security') diff --git a/security/keys/process_keys.c b/security/keys/process_keys.c index f8e7251ae2c..504bdd2452b 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); -- cgit v1.2.3-18-g5258