crypto: sun8i-ce - Use helper to set reqsize
authorOvidiu Panait <ovidiu.panait@windriver.com>
Mon, 18 Dec 2023 16:46:48 +0000 (18:46 +0200)
committerHerbert Xu <herbert@gondor.apana.org.au>
Fri, 29 Dec 2023 03:25:55 +0000 (11:25 +0800)
The value of reqsize must only be changed through the helper.

Signed-off-by: Ovidiu Panait <ovidiu.panait@windriver.com>
Acked-by: Jernej Skrabec <jernej.skrabec@gmail.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
drivers/crypto/allwinner/sun8i-ce/sun8i-ce-cipher.c

index 8d4c42863a621ea2dd155d2c21ea2e81d40ab5e1..1262a7773ef304d184799771166ca5700fb7871a 100644 (file)
@@ -431,8 +431,8 @@ int sun8i_ce_cipher_init(struct crypto_tfm *tfm)
                return PTR_ERR(op->fallback_tfm);
        }
 
-       sktfm->reqsize = sizeof(struct sun8i_cipher_req_ctx) +
-                        crypto_skcipher_reqsize(op->fallback_tfm);
+       crypto_skcipher_set_reqsize(sktfm, sizeof(struct sun8i_cipher_req_ctx) +
+                                   crypto_skcipher_reqsize(op->fallback_tfm));
 
        memcpy(algt->fbname,
               crypto_tfm_alg_driver_name(crypto_skcipher_tfm(op->fallback_tfm)),