diff options
author | Herbert Xu <herbert@gondor.apana.org.au> | 2022-11-22 17:40:51 +0800 |
---|---|---|
committer | Herbert Xu <herbert@gondor.apana.org.au> | 2022-12-02 18:12:39 +0800 |
commit | 908d383b6c94be0f89c5e2a5a346d99495efd4d4 (patch) | |
tree | ce886faa6d08bee7422318730b444964e109cd38 /drivers/crypto | |
parent | 80e62ad58db084920d8cf23323b713391e09f374 (diff) |
crypto: caam - Use helper to set reqsize
The value of reqsize must only be changed through the helper.
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Reviewed-by: Gaurav Jain <gaurav.jain@nxp.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Diffstat (limited to 'drivers/crypto')
-rw-r--r-- | drivers/crypto/caam/caampkc.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/crypto/caam/caampkc.c b/drivers/crypto/caam/caampkc.c index 886727576710..642846693d7c 100644 --- a/drivers/crypto/caam/caampkc.c +++ b/drivers/crypto/caam/caampkc.c @@ -1099,6 +1099,8 @@ static int caam_rsa_init_tfm(struct crypto_akcipher *tfm) { struct caam_rsa_ctx *ctx = akcipher_tfm_ctx(tfm); + akcipher_set_reqsize(tfm, sizeof(struct caam_rsa_req_ctx)); + ctx->dev = caam_jr_alloc(); if (IS_ERR(ctx->dev)) { @@ -1141,7 +1143,6 @@ static struct caam_akcipher_alg caam_rsa = { .max_size = caam_rsa_max_size, .init = caam_rsa_init_tfm, .exit = caam_rsa_exit_tfm, - .reqsize = sizeof(struct caam_rsa_req_ctx), .base = { .cra_name = "rsa", .cra_driver_name = "rsa-caam", |