diff options
Diffstat (limited to 'crypto/pcbc.c')
-rw-r--r-- | crypto/pcbc.c | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/crypto/pcbc.c b/crypto/pcbc.c index 5174d7fdad6e..c3ed8a1c9f46 100644 --- a/crypto/pcbc.c +++ b/crypto/pcbc.c | |||
@@ -279,13 +279,18 @@ static void crypto_pcbc_exit_tfm(struct crypto_tfm *tfm) | |||
279 | crypto_free_cipher(ctx->child); | 279 | crypto_free_cipher(ctx->child); |
280 | } | 280 | } |
281 | 281 | ||
282 | static struct crypto_instance *crypto_pcbc_alloc(void *param, unsigned int len) | 282 | static struct crypto_instance *crypto_pcbc_alloc(struct rtattr **tb) |
283 | { | 283 | { |
284 | struct crypto_instance *inst; | 284 | struct crypto_instance *inst; |
285 | struct crypto_alg *alg; | 285 | struct crypto_alg *alg; |
286 | int err; | ||
287 | |||
288 | err = crypto_check_attr_type(tb, CRYPTO_ALG_TYPE_BLKCIPHER); | ||
289 | if (err) | ||
290 | return ERR_PTR(err); | ||
286 | 291 | ||
287 | alg = crypto_get_attr_alg(param, len, CRYPTO_ALG_TYPE_CIPHER, | 292 | alg = crypto_get_attr_alg(tb, CRYPTO_ALG_TYPE_CIPHER, |
288 | CRYPTO_ALG_TYPE_MASK | CRYPTO_ALG_ASYNC); | 293 | CRYPTO_ALG_TYPE_MASK); |
289 | if (IS_ERR(alg)) | 294 | if (IS_ERR(alg)) |
290 | return ERR_PTR(PTR_ERR(alg)); | 295 | return ERR_PTR(PTR_ERR(alg)); |
291 | 296 | ||