Skip to content

Commit e67eab3

Browse files
Alan Coxtorvalds
authored andcommitted
keys: fix unreachable code
We set ret to NULL then test it. Remove the bogus test Signed-off-by: Alan Cox <[email protected]> Signed-off-by: David Howells <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
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

Lines changed: 0 additions & 2 deletions
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)