crypto: shash - Remove superfluous check in init_tfm

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Linux Kernel Mailing List
Date: Thursday, March 26, 2009 - 12:03 pm

Gitweb:     http://git.kernel.org/linus/1693531e9ef11959300617c68a8322ad006b5475
Commit:     1693531e9ef11959300617c68a8322ad006b5475
Parent:     07bf44f86989f5ed866510374fe761d1903681fb
Author:     Herbert Xu <herbert@gondor.apana.org.au>
AuthorDate: Wed Jan 14 13:34:48 2009 +1100
Committer:  Herbert Xu <herbert@gondor.apana.org.au>
CommitDate: Wed Feb 18 16:48:05 2009 +0800

    crypto: shash - Remove superfluous check in init_tfm
    
    We're currently checking the frontend type in init_tfm.  This is
    completely pointless because the fact that we're called at all
    means that the frontend is ours so the type must match as well.
    
    Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
---
 crypto/shash.c |    2 --
 1 files changed, 0 insertions(+), 2 deletions(-)

diff --git a/crypto/shash.c b/crypto/shash.c
index d5a2b61..13a0dc1 100644
--- a/crypto/shash.c
+++ b/crypto/shash.c
@@ -442,8 +442,6 @@ static unsigned int crypto_shash_ctxsize(struct crypto_alg *alg, u32 type,
 static int crypto_shash_init_tfm(struct crypto_tfm *tfm,
 				 const struct crypto_type *frontend)
 {
-	if (frontend->type != CRYPTO_ALG_TYPE_SHASH)
-		return -EINVAL;
 	return 0;
 }
 
--
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
crypto: shash - Remove superfluous check in init_tfm, Linux Kernel Mailing ..., (Thu Mar 26, 12:03 pm)