Skip to content

Commit

Permalink
security: keys: remove redundant assignment to key_ref
Browse files Browse the repository at this point in the history
Variable key_ref is being assigned a value that is never read;
key_ref is being re-assigned a few statements later.  Hence this
assignment is redundant and can be removed.

Signed-off-by: Colin Ian King <colin.king@canonical.com>
Signed-off-by: David Howells <dhowells@redhat.com>
Reviewed-by: James Morris <james.l.morris@oracle.com>
  • Loading branch information
Colin Ian King authored and David Howells committed Dec 8, 2017
1 parent aa33003 commit 3d1f025
Showing 1 changed file with 0 additions and 1 deletion.
1 change: 0 additions & 1 deletion security/keys/key.c
Original file line number Diff line number Diff line change
Expand Up @@ -833,7 +833,6 @@ key_ref_t key_create_or_update(key_ref_t keyring_ref,

key_check(keyring);

key_ref = ERR_PTR(-EPERM);
if (!(flags & KEY_ALLOC_BYPASS_RESTRICTION))
restrict_link = keyring->restrict_link;

Expand Down

0 comments on commit 3d1f025

Please sign in to comment.