Skip to content

Commit

Permalink
keys: fix unreachable code
Browse files Browse the repository at this point in the history
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]>
  • Loading branch information
Alan Cox authored and torvalds committed Dec 21, 2012
1 parent a68c2f1 commit e67eab3
Showing 1 changed file with 0 additions and 2 deletions.
2 changes: 0 additions & 2 deletions security/keys/process_keys.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit e67eab3

Please sign in to comment.