]> git.baikalelectronics.ru Git - kernel.git/commit
crypto: shash - remove pointless checks of shash_alg::{export,import}
authorEric Biggers <ebiggers@google.com>
Mon, 7 Jan 2019 03:08:01 +0000 (19:08 -0800)
committerHerbert Xu <herbert@gondor.apana.org.au>
Fri, 18 Jan 2019 10:40:24 +0000 (18:40 +0800)
commitb6f8591eff02626787ed353a5d4702ac5965778e
treebd5b55d403870ca4ce83bec07c3e923b57c4c8ba
parent96224af3801d934d7d5f27b67c52116b8c5f27aa
crypto: shash - remove pointless checks of shash_alg::{export,import}

crypto_init_shash_ops_async() only gives the ahash tfm non-NULL
->export() and ->import() if the underlying shash alg has these
non-NULL.  This doesn't make sense because when an shash algorithm is
registered, shash_prepare_alg() sets a default ->export() and ->import()
if the implementor didn't provide them.  And elsewhere it's assumed that
all shash algs and ahash tfms have non-NULL ->export() and ->import().

Therefore, remove these unnecessary, always-true conditions.

Signed-off-by: Eric Biggers <ebiggers@google.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
crypto/shash.c