Skip to content

Commit e67eab3

Browse files
Alan Coxtorvalds
Alan Cox
authored andcommitted
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>
1 parent a68c2f1 commit e67eab3

File tree

1 file changed

+0
-2
lines changed

1 file changed

+0
-2
lines changed

security/keys/process_keys.c

-2
Original file line numberDiff line numberDiff line change
@@ -367,8 +367,6 @@ key_ref_t search_my_process_keyrings(struct key_type *type,
367367

368368
switch (PTR_ERR(key_ref)) {
369369
case -EAGAIN: /* no key */
370-
if (ret)
371-
break;
372370
case -ENOKEY: /* negative key */
373371
ret = key_ref;
374372
break;

0 commit comments

Comments
 (0)