Skip to contentSkip to conversation

Fix install_process_keyring error handling

PATCH In review Andi Kleen 2 participants 2 messages Oct 25, 2010 – Oct 26, 2010

Subsystems (2)
lore
Share & tools
lore

Andi Kleen

author
#0 lore raw

PATCH 1/1 Fix install_process_keyring error handling

From: Andi Kleen <[email protected]>

Fix incorrect error check that returns 1 for error instead of the expected error code.

---
 security/keys/process_keys.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
security/keys/process_keys.c +1 -1
index f8e7251..504bdd2 100644
@@ -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);
Signature · 1 line
1.7.1