summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlan Cox <alan@linux.intel.com>2012-09-28 13:20:02 +0200
committerDavid Howells <dhowells@redhat.com>2012-09-28 13:20:02 +0200
commit631527703d1aa2f0c5dc2af0d998f4da95c83f0e (patch)
treea2aec36285e598c3f1c34aef166b242859bddb63
parentMerge tag 'v3.6-rc7' into next (diff)
downloadlinux-631527703d1aa2f0c5dc2af0d998f4da95c83f0e.tar.xz
linux-631527703d1aa2f0c5dc2af0d998f4da95c83f0e.zip
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: David Howells <dhowells@redhat.com>
-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;