diff options
Diffstat (limited to 'crypto/shash.c')
-rw-r--r-- | crypto/shash.c | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/crypto/shash.c b/crypto/shash.c index 7063e1421504..615a5f4d9b7a 100644 --- a/crypto/shash.c +++ b/crypto/shash.c | |||
@@ -267,11 +267,11 @@ static void crypto_exit_shash_ops_async(struct crypto_tfm *tfm) | |||
267 | crypto_free_shash(*ctx); | 267 | crypto_free_shash(*ctx); |
268 | } | 268 | } |
269 | 269 | ||
270 | static int crypto_init_shash_ops_async(struct crypto_tfm *tfm) | 270 | int crypto_init_shash_ops_async(struct crypto_tfm *tfm) |
271 | { | 271 | { |
272 | struct crypto_alg *calg = tfm->__crt_alg; | 272 | struct crypto_alg *calg = tfm->__crt_alg; |
273 | struct shash_alg *alg = __crypto_shash_alg(calg); | 273 | struct shash_alg *alg = __crypto_shash_alg(calg); |
274 | struct ahash_tfm *crt = &tfm->crt_ahash; | 274 | struct crypto_ahash *crt = __crypto_ahash_cast(tfm); |
275 | struct crypto_shash **ctx = crypto_tfm_ctx(tfm); | 275 | struct crypto_shash **ctx = crypto_tfm_ctx(tfm); |
276 | struct crypto_shash *shash; | 276 | struct crypto_shash *shash; |
277 | 277 | ||
@@ -428,8 +428,6 @@ static int crypto_init_shash_ops(struct crypto_tfm *tfm, u32 type, u32 mask) | |||
428 | switch (mask & CRYPTO_ALG_TYPE_MASK) { | 428 | switch (mask & CRYPTO_ALG_TYPE_MASK) { |
429 | case CRYPTO_ALG_TYPE_HASH_MASK: | 429 | case CRYPTO_ALG_TYPE_HASH_MASK: |
430 | return crypto_init_shash_ops_compat(tfm); | 430 | return crypto_init_shash_ops_compat(tfm); |
431 | case CRYPTO_ALG_TYPE_AHASH_MASK: | ||
432 | return crypto_init_shash_ops_async(tfm); | ||
433 | } | 431 | } |
434 | 432 | ||
435 | return -EINVAL; | 433 | return -EINVAL; |
@@ -441,8 +439,6 @@ static unsigned int crypto_shash_ctxsize(struct crypto_alg *alg, u32 type, | |||
441 | switch (mask & CRYPTO_ALG_TYPE_MASK) { | 439 | switch (mask & CRYPTO_ALG_TYPE_MASK) { |
442 | case CRYPTO_ALG_TYPE_HASH_MASK: | 440 | case CRYPTO_ALG_TYPE_HASH_MASK: |
443 | return sizeof(struct shash_desc *); | 441 | return sizeof(struct shash_desc *); |
444 | case CRYPTO_ALG_TYPE_AHASH_MASK: | ||
445 | return sizeof(struct crypto_shash *); | ||
446 | } | 442 | } |
447 | 443 | ||
448 | return 0; | 444 | return 0; |