summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlan Cox <alan@linux.intel.com>2012-10-25 15:23:35 +0100
committerJiri Kosina <jkosina@suse.cz>2012-10-25 18:00:27 +0200
commitb010520ab3d2c05eb444ed5e01fe6c33842f597a (patch)
treecf958deb54615a8ff5432bdbf3b70da2a76b9508
parent6f7c962c0b8efc78aec4c5514865fb5be83f4d92 (diff)
downloadlinux-b010520ab3d2c05eb444ed5e01fe6c33842f597a.tar.bz2
keys: Fix unreachable code
We set ret to NULL then test it. Remove the bogus test Signed-off-by: Alan Cox <alan@linux.intel.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
-rw-r--r--security/keys/process_keys.c2
1 files changed, 0 insertions, 2 deletions
diff --git a/security/keys/process_keys.c b/security/keys/process_keys.c
index 54339cfd6734..178b8c3b130a 100644
--- a/security/keys/process_keys.c
+++ b/security/keys/process_keys.c
@@ -357,8 +357,6 @@ key_ref_t search_my_process_keyrings(struct key_type *type,
switch (PTR_ERR(key_ref)) {
case -EAGAIN: /* no key */
- if (ret)
- break;
case -ENOKEY: /* negative key */
ret = key_ref;
break;