Merge tag 'pstore-v4.8' of git://git.kernel.org/pub/scm/linux/kernel/git/kees/linux
[sfrench/cifs-2.6.git] / crypto / ahash.c
index 3887a98abcc3c255ccc37de87f11411b17522086..2ce8bcb9049c8a6aa3c3120287816509b9b8228a 100644 (file)
@@ -461,10 +461,10 @@ static int crypto_ahash_init_tfm(struct crypto_tfm *tfm)
 
 static unsigned int crypto_ahash_extsize(struct crypto_alg *alg)
 {
-       if (alg->cra_type == &crypto_ahash_type)
-               return alg->cra_ctxsize;
+       if (alg->cra_type != &crypto_ahash_type)
+               return sizeof(struct crypto_shash *);
 
-       return sizeof(struct crypto_shash *);
+       return crypto_alg_extsize(alg);
 }
 
 #ifdef CONFIG_NET