aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlan Cox2012-12-20 17:05:54 -0600
committerLinus Torvalds2012-12-20 19:40:21 -0600
commite67eab39bee26f509d38d00ca1a8f24b63f46a31 (patch)
tree252072ae63bd5ecb8186242ace12e7df3a1311ad /security
parenta68c2f12b4b28994aaf622bbe5724b7258cc2fcf (diff)
downloadkernel-common-e67eab39bee26f509d38d00ca1a8f24b63f46a31.tar.gz
kernel-common-e67eab39bee26f509d38d00ca1a8f24b63f46a31.tar.xz
kernel-common-e67eab39bee26f509d38d00ca1a8f24b63f46a31.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> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'security')
-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 58dfe089094..20e4bf57aec 100644
--- a/security/keys/process_keys.c
+++ b/security/keys/process_keys.c
@@ -367,8 +367,6 @@ key_ref_t search_my_process_keyrings(struct key_type *type,
367 367
368 switch (PTR_ERR(key_ref)) { 368 switch (PTR_ERR(key_ref)) {
369 case -EAGAIN: /* no key */ 369 case -EAGAIN: /* no key */
370 if (ret)
371 break;
372 case -ENOKEY: /* negative key */ 370 case -ENOKEY: /* negative key */
373 ret = key_ref; 371 ret = key_ref;
374 break; 372 break;