crypto: x86/chacha - only unregister algorithms if registered
authorEric Biggers <ebiggers@google.com>
Mon, 18 Nov 2019 07:21:58 +0000 (23:21 -0800)
committerHerbert Xu <herbert@gondor.apana.org.au>
Fri, 22 Nov 2019 10:48:39 +0000 (18:48 +0800)
commitb62755aed3a3f5ca9edd2718339ccea3b6bbbe57
tree6cef27d00d7e9442dee0f7f18c275607c8f58412
parent2043323a799a660bc84bbee404cf7a2617ec6157
crypto: x86/chacha - only unregister algorithms if registered

It's not valid to call crypto_unregister_skciphers() without a prior
call to crypto_register_skciphers().

Fixes: 84e03fa39fbe ("crypto: x86/chacha - expose SIMD ChaCha routine as library function")
Signed-off-by: Eric Biggers <ebiggers@google.com>
Acked-by: Ard Biesheuvel <ardb@kernel.org>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
arch/x86/crypto/chacha_glue.c