crypto: gcm - simplify error handling in crypto_rfc4543_create()
authorEric Biggers <ebiggers@google.com>
Wed, 26 Feb 2020 04:59:19 +0000 (20:59 -0800)
committerHerbert Xu <herbert@gondor.apana.org.au>
Fri, 6 Mar 2020 01:28:23 +0000 (12:28 +1100)
commitc4caa56d8f995aa34118757c6525cf6048c68def
treea2e854b3cc10ef67348834b177862316b92a381e
parent959ac1cdd630b48fad3d8f47c96a01bfc3d71377
crypto: gcm - simplify error handling in crypto_rfc4543_create()

Simplify the error handling in crypto_rfc4543_create() by taking
advantage of crypto_grab_aead() now handling an ERR_PTR() name and by
taking advantage of crypto_drop_aead() now accepting (as a no-op) a
spawn that hasn't been grabbed yet.

Conveniently, this eliminates the 'ccm_name' variable which was
incorrectly named (it should have been 'gcm_name').

Also fix a weird case where a line was terminated by a comma rather than
a semicolon, causing the statement to be continued on the next line.
Fortunately the code still behaved as intended, though.

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