crypto: shash - Remove superfluous check in init_tfm
authorHerbert Xu <herbert@gondor.apana.org.au>
Wed, 14 Jan 2009 02:34:48 +0000 (13:34 +1100)
committerHerbert Xu <herbert@gondor.apana.org.au>
Wed, 18 Feb 2009 08:48:05 +0000 (16:48 +0800)
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

index d5a2b61..13a0dc1 100644 (file)
@@ -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;
 }