summaryrefslogtreecommitdiffstatshomepage
path: root/crypto/ecdh.c
diff options
context:
space:
mode:
authorTudor-Dan Ambarus <tudor.ambarus@microchip.com>2017-11-02 06:46:47 -0800
committerHerbert Xu <herbert@gondor.apana.org.au>2017-11-05 21:45:04 -0900
commitf560acc3bbb05a6e974ea245562c94eb5d344768 (patch)
treef4ddfd3c44461af10ac26350f4aff001c9da3d4f /crypto/ecdh.c
parent3c24f992a4fc2ebe17b5f0aafabc49ab14876ed3 (diff)
downloadlinux-stable-f560acc3bbb05a6e974ea245562c94eb5d344768.tar.gz
linux-stable-f560acc3bbb05a6e974ea245562c94eb5d344768.tar.bz2
linux-stable-f560acc3bbb05a6e974ea245562c94eb5d344768.tar.xz
linux-stable-f560acc3bbb05a6e974ea245562c94eb5d344768.zip
crypto: ecdh - remove empty exit()
Pointer members of an object with static storage duration, if not explicitly initialized, will be initialized to a NULL pointer. The crypto API checks if this pointer is not NULL before using it, we are safe to remove the function. Signed-off-by: Tudor Ambarus <tudor.ambarus@microchip.com> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Diffstat (limited to 'crypto/ecdh.c')
-rw-r--r--crypto/ecdh.c6
1 files changed, 0 insertions, 6 deletions
diff --git a/crypto/ecdh.c b/crypto/ecdh.c
index 4271fc77d261..3aca0933ec44 100644
--- a/crypto/ecdh.c
+++ b/crypto/ecdh.c
@@ -131,17 +131,11 @@ static unsigned int ecdh_max_size(struct crypto_kpp *tfm)
131 return ctx->ndigits << (ECC_DIGITS_TO_BYTES_SHIFT + 1); 131 return ctx->ndigits << (ECC_DIGITS_TO_BYTES_SHIFT + 1);
132} 132}
133 133
134static void no_exit_tfm(struct crypto_kpp *tfm)
135{
136 return;
137}
138
139static struct kpp_alg ecdh = { 134static struct kpp_alg ecdh = {
140 .set_secret = ecdh_set_secret, 135 .set_secret = ecdh_set_secret,
141 .generate_public_key = ecdh_compute_value, 136 .generate_public_key = ecdh_compute_value,
142 .compute_shared_secret = ecdh_compute_value, 137 .compute_shared_secret = ecdh_compute_value,
143 .max_size = ecdh_max_size, 138 .max_size = ecdh_max_size,
144 .exit = no_exit_tfm,
145 .base = { 139 .base = {
146 .cra_name = "ecdh", 140 .cra_name = "ecdh",
147 .cra_driver_name = "ecdh-generic", 141 .cra_driver_name = "ecdh-generic",