crypto: atmel-ecc - drop redundant return variable

In atmel_ecdh_generate_public_key(), drop the redundant return variable
and return -EINVAL and 0 directly.

Signed-off-by: Thorsten Blum <thorsten.blum@linux.dev>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
This commit is contained in:
Thorsten Blum 2026-07-28 22:58:27 +02:00 committed by Herbert Xu
parent bda65642eb
commit dc9e9023ad

View File

@ -124,7 +124,6 @@ static int atmel_ecdh_generate_public_key(struct kpp_request *req)
struct crypto_kpp *tfm = crypto_kpp_reqtfm(req);
struct atmel_ecdh_ctx *ctx = kpp_tfm_ctx(tfm);
size_t copied, nbytes;
int ret = 0;
if (ctx->do_fallback) {
kpp_request_set_tfm(req, ctx->fallback);
@ -142,9 +141,9 @@ static int atmel_ecdh_generate_public_key(struct kpp_request *req)
sg_nents_for_len(req->dst, nbytes),
ctx->public_key, nbytes);
if (copied != nbytes)
ret = -EINVAL;
return -EINVAL;
return ret;
return 0;
}
static int atmel_ecdh_compute_shared_secret(struct kpp_request *req)