security: keys: remove redundant assignment to key_ref
authorColin Ian King <colin.king@canonical.com>
Fri, 8 Dec 2017 15:13:29 +0000 (15:13 +0000)
committerDavid Howells <dhowells@redhat.com>
Fri, 8 Dec 2017 15:13:29 +0000 (15:13 +0000)
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>
security/keys/key.c

index 6604918..d97c939 100644 (file)
@@ -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;