diff options
Diffstat (limited to 'crypto/lrw.c')
-rw-r--r-- | crypto/lrw.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/crypto/lrw.c b/crypto/lrw.c index 56642586d84f..b4105080ac7a 100644 --- a/crypto/lrw.c +++ b/crypto/lrw.c | |||
@@ -201,21 +201,22 @@ static int decrypt(struct blkcipher_desc *desc, struct scatterlist *dst, | |||
201 | 201 | ||
202 | static int init_tfm(struct crypto_tfm *tfm) | 202 | static int init_tfm(struct crypto_tfm *tfm) |
203 | { | 203 | { |
204 | struct crypto_cipher *cipher; | ||
204 | struct crypto_instance *inst = (void *)tfm->__crt_alg; | 205 | struct crypto_instance *inst = (void *)tfm->__crt_alg; |
205 | struct crypto_spawn *spawn = crypto_instance_ctx(inst); | 206 | struct crypto_spawn *spawn = crypto_instance_ctx(inst); |
206 | struct priv *ctx = crypto_tfm_ctx(tfm); | 207 | struct priv *ctx = crypto_tfm_ctx(tfm); |
207 | u32 *flags = &tfm->crt_flags; | 208 | u32 *flags = &tfm->crt_flags; |
208 | 209 | ||
209 | tfm = crypto_spawn_tfm(spawn); | 210 | cipher = crypto_spawn_cipher(spawn); |
210 | if (IS_ERR(tfm)) | 211 | if (IS_ERR(cipher)) |
211 | return PTR_ERR(tfm); | 212 | return PTR_ERR(cipher); |
212 | 213 | ||
213 | if (crypto_tfm_alg_blocksize(tfm) != 16) { | 214 | if (crypto_cipher_blocksize(cipher) != 16) { |
214 | *flags |= CRYPTO_TFM_RES_BAD_BLOCK_LEN; | 215 | *flags |= CRYPTO_TFM_RES_BAD_BLOCK_LEN; |
215 | return -EINVAL; | 216 | return -EINVAL; |
216 | } | 217 | } |
217 | 218 | ||
218 | ctx->child = crypto_cipher_cast(tfm); | 219 | ctx->child = cipher; |
219 | return 0; | 220 | return 0; |
220 | } | 221 | } |
221 | 222 | ||