summaryrefslogtreecommitdiff
path: root/crypto
diff options
context:
space:
mode:
authorAlexander Kuleshov <kuleshovmail@gmail.com>2015-11-25 23:48:28 +0600
committerHerbert Xu <herbert@gondor.apana.org.au>2015-11-27 21:22:18 +0800
commitc012a79d0ce95bd8488a5a44cd8c00c275774518 (patch)
tree6ac2345732134439404f39fdcc28e0cd6355930c /crypto
parent433cd2c617bfbac27a02e40fbcce1713c84ce441 (diff)
crypto: cryptod - use crypto_skcipher_type() for getting skcipher type
The <linux/crypto.h> provides inline function - crypto_skcipher_type(). Let's use it in the cryptd_alloc_ablkcipher() instead of direct calculation. Signed-off-by: Alexander Kuleshov <kuleshovmail@gmail.com> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Diffstat (limited to 'crypto')
-rw-r--r--crypto/cryptd.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/crypto/cryptd.c b/crypto/cryptd.c
index c81861b1350b..c4af8aa1c304 100644
--- a/crypto/cryptd.c
+++ b/crypto/cryptd.c
@@ -887,8 +887,7 @@ struct cryptd_ablkcipher *cryptd_alloc_ablkcipher(const char *alg_name,
if (snprintf(cryptd_alg_name, CRYPTO_MAX_ALG_NAME,
"cryptd(%s)", alg_name) >= CRYPTO_MAX_ALG_NAME)
return ERR_PTR(-EINVAL);
- type &= ~(CRYPTO_ALG_TYPE_MASK | CRYPTO_ALG_GENIV);
- type |= CRYPTO_ALG_TYPE_BLKCIPHER;
+ type = crypto_skcipher_type(type);
mask &= ~CRYPTO_ALG_TYPE_MASK;
mask |= (CRYPTO_ALG_GENIV | CRYPTO_ALG_TYPE_BLKCIPHER_MASK);
tfm = crypto_alloc_base(cryptd_alg_name, type, mask);