mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH 1/2] keys: Fix unreachable code
@ 2012-12-17 13:15 David Howells
  2012-12-17 13:15 ` [PATCH 2/2] KEYS: Use keyring_alloc() to create module signing keyring David Howells
  0 siblings, 1 reply; 2+ messages in thread
From: David Howells @ 2012-12-17 13:15 UTC (permalink / raw)
  To: torvalds; +Cc: linux-security-module, Alan Cox, jmorris, linux-kernel

From: Alan Cox <alan@linux.intel.com>

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>
---

 security/keys/process_keys.c |    2 --
 1 file changed, 2 deletions(-)

diff --git a/security/keys/process_keys.c b/security/keys/process_keys.c
index 58dfe08..20e4bf5 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,
 
 		switch (PTR_ERR(key_ref)) {
 		case -EAGAIN: /* no key */
-			if (ret)
-				break;
 		case -ENOKEY: /* negative key */
 			ret = key_ref;
 			break;


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2012-12-17 13:52 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-12-17 13:15 [PATCH 1/2] keys: Fix unreachable code David Howells
2012-12-17 13:15 ` [PATCH 2/2] KEYS: Use keyring_alloc() to create module signing keyring David Howells

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®