aboutsummaryrefslogtreecommitdiffstats
path: root/crypto/xcbc.c
diff options
context:
space:
mode:
Diffstat (limited to 'crypto/xcbc.c')
-rw-r--r--crypto/xcbc.c12
1 files changed, 9 insertions, 3 deletions
diff --git a/crypto/xcbc.c b/crypto/xcbc.c
index 53e8ccbf0f5f..9f502b86e0ea 100644
--- a/crypto/xcbc.c
+++ b/crypto/xcbc.c
@@ -288,12 +288,18 @@ static void xcbc_exit_tfm(struct crypto_tfm *tfm)
288 crypto_free_cipher(ctx->child); 288 crypto_free_cipher(ctx->child);
289} 289}
290 290
291static struct crypto_instance *xcbc_alloc(void *param, unsigned int len) 291static struct crypto_instance *xcbc_alloc(struct rtattr **tb)
292{ 292{
293 struct crypto_instance *inst; 293 struct crypto_instance *inst;
294 struct crypto_alg *alg; 294 struct crypto_alg *alg;
295 alg = crypto_get_attr_alg(param, len, CRYPTO_ALG_TYPE_CIPHER, 295 int err;
296 CRYPTO_ALG_TYPE_HASH_MASK | CRYPTO_ALG_ASYNC); 296
297 err = crypto_check_attr_type(tb, CRYPTO_ALG_TYPE_HASH);
298 if (err)
299 return ERR_PTR(err);
300
301 alg = crypto_get_attr_alg(tb, CRYPTO_ALG_TYPE_CIPHER,
302 CRYPTO_ALG_TYPE_MASK);
297 if (IS_ERR(alg)) 303 if (IS_ERR(alg))
298 return ERR_PTR(PTR_ERR(alg)); 304 return ERR_PTR(PTR_ERR(alg));
299 305