crypto: adiantum - use crypto_grab_{cipher,shash} and simplify error paths
authorEric Biggers <ebiggers@google.com>
Fri, 3 Jan 2020 03:58:52 +0000 (19:58 -0800)
committerHerbert Xu <herbert@gondor.apana.org.au>
Thu, 9 Jan 2020 03:30:55 +0000 (11:30 +0800)
commitba44840747bdd60095881830af0d75f0e5017c99
tree09b30db12a6c937425a09777d918604b676bee5d
parent0764ac28763fdb533809090005956fcd3123fb60
crypto: adiantum - use crypto_grab_{cipher,shash} and simplify error paths

Make the adiantum template use the new functions crypto_grab_cipher()
and crypto_grab_shash() to initialize its cipher and shash spawns.

This is needed to make all spawns be initialized in a consistent way.

Also simplify the error handling by taking advantage of crypto_drop_*()
now accepting (as a no-op) spawns that haven't been initialized yet, and
by taking advantage of crypto_grab_*() now handling ERR_PTR() names.

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