]> Git Repo - linux.git/commitdiff
integrity: remove redundant initialization of variable ret
authorColin Ian King <[email protected]>
Wed, 1 Jul 2020 13:46:34 +0000 (14:46 +0100)
committerMimi Zohar <[email protected]>
Mon, 27 Jul 2020 20:52:09 +0000 (16:52 -0400)
The variable ret is being initialized with a value that is never read
and it is being updated later with a new value.  The initialization is
redundant and can be removed.

Fixes: eb5798f2e28f ("integrity: convert digsig to akcipher api")
Signed-off-by: Colin Ian King <[email protected]>
Acked-by: James Morris <[email protected]>
Addresses-Coverity: ("Unused value")
Signed-off-by: Mimi Zohar <[email protected]>
security/integrity/digsig_asymmetric.c

index 4e0d6778277ebc9c51e9c9ce7de56c0fa8ac9e54..cfa4127d0518f8636d08e388294c0e0830b7b3ab 100644 (file)
@@ -79,7 +79,7 @@ int asymmetric_verify(struct key *keyring, const char *sig,
        struct public_key_signature pks;
        struct signature_v2_hdr *hdr = (struct signature_v2_hdr *)sig;
        struct key *key;
-       int ret = -ENOMEM;
+       int ret;
 
        if (siglen <= sizeof(*hdr))
                return -EBADMSG;
This page took 0.058075 seconds and 4 git commands to generate.