summaryrefslogtreecommitdiffstats
path: root/security
diff options
context:
space:
mode:
authorColin Ian King <colin.king@canonical.com>2020-07-01 14:46:34 +0100
committerMimi Zohar <zohar@linux.ibm.com>2020-07-27 16:52:09 -0400
commit3db0d0c276a752af39beb5ca7424cb659aa005bb (patch)
tree1dbf5e2ad52e34fd1e5c147d6a24099d0a41215f /security
parent311aa6aafea446c2f954cc19d66425bfed8c4b0b (diff)
downloadlinux-3db0d0c276a752af39beb5ca7424cb659aa005bb.tar.bz2
integrity: remove redundant initialization of variable ret
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 <colin.king@canonical.com> Acked-by: James Morris <jamorris@linux.microsoft.com> Addresses-Coverity: ("Unused value") Signed-off-by: Mimi Zohar <zohar@linux.ibm.com>
Diffstat (limited to 'security')
-rw-r--r--security/integrity/digsig_asymmetric.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/security/integrity/digsig_asymmetric.c b/security/integrity/digsig_asymmetric.c
index 4e0d6778277e..cfa4127d0518 100644
--- a/security/integrity/digsig_asymmetric.c
+++ b/security/integrity/digsig_asymmetric.c
@@ -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;