aboutsummaryrefslogtreecommitdiffstats
path: root/crypto/cbc.c
diff options
context:
space:
mode:
Diffstat (limited to 'crypto/cbc.c')
-rw-r--r--crypto/cbc.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/crypto/cbc.c b/crypto/cbc.c
index f5542b4db387..136fea7e7000 100644
--- a/crypto/cbc.c
+++ b/crypto/cbc.c
@@ -243,6 +243,7 @@ static int crypto_cbc_init_tfm(struct crypto_tfm *tfm)
243 struct crypto_instance *inst = (void *)tfm->__crt_alg; 243 struct crypto_instance *inst = (void *)tfm->__crt_alg;
244 struct crypto_spawn *spawn = crypto_instance_ctx(inst); 244 struct crypto_spawn *spawn = crypto_instance_ctx(inst);
245 struct crypto_cbc_ctx *ctx = crypto_tfm_ctx(tfm); 245 struct crypto_cbc_ctx *ctx = crypto_tfm_ctx(tfm);
246 struct crypto_cipher *cipher;
246 247
247 switch (crypto_tfm_alg_blocksize(tfm)) { 248 switch (crypto_tfm_alg_blocksize(tfm)) {
248 case 8: 249 case 8:
@@ -260,11 +261,11 @@ static int crypto_cbc_init_tfm(struct crypto_tfm *tfm)
260 ctx->xor = xor_quad; 261 ctx->xor = xor_quad;
261 } 262 }
262 263
263 tfm = crypto_spawn_tfm(spawn); 264 cipher = crypto_spawn_cipher(spawn);
264 if (IS_ERR(tfm)) 265 if (IS_ERR(cipher))
265 return PTR_ERR(tfm); 266 return PTR_ERR(cipher);
266 267
267 ctx->child = crypto_cipher_cast(tfm); 268 ctx->child = cipher;
268 return 0; 269 return 0;
269} 270}
270 271