diff options
| author | Thorsten Blum <thorsten.blum@linux.dev> | 2026-06-03 01:25:19 +0300 |
|---|---|---|
| committer | Herbert Xu <herbert@gondor.apana.org.au> | 2026-06-12 04:56:45 +0300 |
| commit | 70fd646ae5ddaae0a7fbbba94b500bde2e1211f0 (patch) | |
| tree | cfcdc1961d1973e34c718660c1e236556894ac17 | |
| parent | 9dbf173bd32d5f81b005008b682bfb50aa093455 (diff) | |
| download | linux-70fd646ae5ddaae0a7fbbba94b500bde2e1211f0.tar.xz | |
crypto: atmel-ecc - drop dead code in atmel_ecdh_max_size
atmel_ecdh_init_tfm() always allocates ctx->fallback, so it is never
NULL in atmel_ecdh_max_size(). Remove the dead code and return
crypto_kpp_maxsize() directly.
Signed-off-by: Thorsten Blum <thorsten.blum@linux.dev>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
| -rw-r--r-- | drivers/crypto/atmel-ecc.c | 10 |
1 files changed, 1 insertions, 9 deletions
diff --git a/drivers/crypto/atmel-ecc.c b/drivers/crypto/atmel-ecc.c index 0ca02995a1de..9da9dd6585df 100644 --- a/drivers/crypto/atmel-ecc.c +++ b/drivers/crypto/atmel-ecc.c @@ -284,15 +284,7 @@ static unsigned int atmel_ecdh_max_size(struct crypto_kpp *tfm) { struct atmel_ecdh_ctx *ctx = kpp_tfm_ctx(tfm); - if (ctx->fallback) - return crypto_kpp_maxsize(ctx->fallback); - - /* - * The device only supports NIST P256 ECC keys. The public key size will - * always be the same. Use a macro for the key size to avoid unnecessary - * computations. - */ - return ATMEL_ECC_PUBKEY_SIZE; + return crypto_kpp_maxsize(ctx->fallback); } static struct kpp_alg atmel_ecdh_nist_p256 = { |
