summaryrefslogtreecommitdiffstats
path: root/crypto/hmac.c
diff options
context:
space:
mode:
Diffstat (limited to 'crypto/hmac.c')
-rw-r--r--crypto/hmac.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/crypto/hmac.c b/crypto/hmac.c
index f03cb32147cc..8b2a212eb0ad 100644
--- a/crypto/hmac.c
+++ b/crypto/hmac.c
@@ -152,8 +152,10 @@ static int hmac_init_tfm(struct crypto_tfm *tfm)
152 152
153 parent->descsize = sizeof(struct shash_desc) + 153 parent->descsize = sizeof(struct shash_desc) +
154 crypto_shash_descsize(hash); 154 crypto_shash_descsize(hash);
155 if (WARN_ON(parent->descsize > HASH_MAX_DESCSIZE)) 155 if (WARN_ON(parent->descsize > HASH_MAX_DESCSIZE)) {
156 crypto_free_shash(hash);
156 return -EINVAL; 157 return -EINVAL;
158 }
157 159
158 ctx->hash = hash; 160 ctx->hash = hash;
159 return 0; 161 return 0;