Commit 908d383b authored by Herbert Xu's avatar Herbert Xu

crypto: caam - Use helper to set reqsize

The value of reqsize must only be changed through the helper.
Signed-off-by: default avatarHerbert Xu <herbert@gondor.apana.org.au>
Reviewed-by: default avatarGaurav Jain <gaurav.jain@nxp.com>
Signed-off-by: default avatarHerbert Xu <herbert@gondor.apana.org.au>
parent 80e62ad5
...@@ -1099,6 +1099,8 @@ static int caam_rsa_init_tfm(struct crypto_akcipher *tfm) ...@@ -1099,6 +1099,8 @@ static int caam_rsa_init_tfm(struct crypto_akcipher *tfm)
{ {
struct caam_rsa_ctx *ctx = akcipher_tfm_ctx(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(); ctx->dev = caam_jr_alloc();
if (IS_ERR(ctx->dev)) { if (IS_ERR(ctx->dev)) {
...@@ -1141,7 +1143,6 @@ static struct caam_akcipher_alg caam_rsa = { ...@@ -1141,7 +1143,6 @@ static struct caam_akcipher_alg caam_rsa = {
.max_size = caam_rsa_max_size, .max_size = caam_rsa_max_size,
.init = caam_rsa_init_tfm, .init = caam_rsa_init_tfm,
.exit = caam_rsa_exit_tfm, .exit = caam_rsa_exit_tfm,
.reqsize = sizeof(struct caam_rsa_req_ctx),
.base = { .base = {
.cra_name = "rsa", .cra_name = "rsa",
.cra_driver_name = "rsa-caam", .cra_driver_name = "rsa-caam",
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment