diff options
Diffstat (limited to 'crypto/pcbc.c')
-rw-r--r-- | crypto/pcbc.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/crypto/pcbc.c b/crypto/pcbc.c index 0ffb46eb259f..5174d7fdad6e 100644 --- a/crypto/pcbc.c +++ b/crypto/pcbc.c | |||
@@ -247,6 +247,7 @@ static int crypto_pcbc_init_tfm(struct crypto_tfm *tfm) | |||
247 | struct crypto_instance *inst = (void *)tfm->__crt_alg; | 247 | struct crypto_instance *inst = (void *)tfm->__crt_alg; |
248 | struct crypto_spawn *spawn = crypto_instance_ctx(inst); | 248 | struct crypto_spawn *spawn = crypto_instance_ctx(inst); |
249 | struct crypto_pcbc_ctx *ctx = crypto_tfm_ctx(tfm); | 249 | struct crypto_pcbc_ctx *ctx = crypto_tfm_ctx(tfm); |
250 | struct crypto_cipher *cipher; | ||
250 | 251 | ||
251 | switch (crypto_tfm_alg_blocksize(tfm)) { | 252 | switch (crypto_tfm_alg_blocksize(tfm)) { |
252 | case 8: | 253 | case 8: |
@@ -264,11 +265,11 @@ static int crypto_pcbc_init_tfm(struct crypto_tfm *tfm) | |||
264 | ctx->xor = xor_quad; | 265 | ctx->xor = xor_quad; |
265 | } | 266 | } |
266 | 267 | ||
267 | tfm = crypto_spawn_tfm(spawn); | 268 | cipher = crypto_spawn_cipher(spawn); |
268 | if (IS_ERR(tfm)) | 269 | if (IS_ERR(cipher)) |
269 | return PTR_ERR(tfm); | 270 | return PTR_ERR(cipher); |
270 | 271 | ||
271 | ctx->child = crypto_cipher_cast(tfm); | 272 | ctx->child = cipher; |
272 | return 0; | 273 | return 0; |
273 | } | 274 | } |
274 | 275 | ||