From: Alan Cox Date: Fri, 28 Sep 2012 11:20:02 +0000 (+0100) Subject: keys: Fix unreachable code X-Git-Tag: firefly_0821_release~3680^2~627^2~58^2~5 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=631527703d1aa2f0c5dc2af0d998f4da95c83f0e;p=firefly-linux-kernel-4.4.55.git keys: Fix unreachable code We set ret to NULL then test it. Remove the bogus test Signed-off-by: Alan Cox Signed-off-by: David Howells --- 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;