summaryrefslogtreecommitdiff
path: root/crypto/ecdh.c
diff options
context:
space:
mode:
authorTudor-Dan Ambarus <tudor.ambarus@microchip.com>2017-11-02 16:46:47 +0200
committerHerbert Xu <herbert@gondor.apana.org.au>2017-11-06 14:45:04 +0800
commit5d41dbc5f74a59a4e71470ab15d7384c8c682040 (patch)
tree4b40cf4fdae7597d232e3ba26bf620a448e55669 /crypto/ecdh.c
parentcd9f27447b694d7f54de66f2ae1ec8333bcb8d9d (diff)
downloadlinux-crypto-5d41dbc5f74a59a4e71470ab15d7384c8c682040.tar.gz
linux-crypto-5d41dbc5f74a59a4e71470ab15d7384c8c682040.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 4271fc77..3aca0933 100644
--- a/crypto/ecdh.c
+++ b/crypto/ecdh.c
@@ -131,17 +131,11 @@ static unsigned int ecdh_max_size(struct crypto_kpp *tfm)
return ctx->ndigits << (ECC_DIGITS_TO_BYTES_SHIFT + 1);
}
-static void no_exit_tfm(struct crypto_kpp *tfm)
-{
- return;
-}
-
static struct kpp_alg ecdh = {
.set_secret = ecdh_set_secret,
.generate_public_key = ecdh_compute_value,
.compute_shared_secret = ecdh_compute_value,
.max_size = ecdh_max_size,
- .exit = no_exit_tfm,
.base = {
.cra_name = "ecdh",
.cra_driver_name = "ecdh-generic",