From: Herbert Xu Date: Wed, 14 Jan 2009 02:34:48 +0000 (+1100) Subject: crypto: shash - Remove superfluous check in init_tfm X-Git-Tag: v2.6.30-rc1~677^2~26 X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=1693531e9ef11959300617c68a8322ad006b5475;p=karo-tx-linux.git 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 --- diff --git a/crypto/shash.c b/crypto/shash.c index d5a2b619c55f..13a0dc150a4d 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; }