]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
crypto: algapi - Use crypto_unregister_algs in crypto_register_algs
authorThorsten Blum <thorsten.blum@linux.dev>
Thu, 11 Dec 2025 10:15:55 +0000 (11:15 +0100)
committerHerbert Xu <herbert@gondor.apana.org.au>
Fri, 19 Dec 2025 06:47:47 +0000 (14:47 +0800)
commit32c539884d098345bf0fa8554ff2118be7571879
tree570c9413dcd1347431de77f31f42f306ee3a2773
parent0e602c5f04943a0a123aef69076ef9305c484c53
crypto: algapi - Use crypto_unregister_algs in crypto_register_algs

Replace the for loop with a call to crypto_unregister_algs(). Return
'ret' immediately and remove the goto statement to simplify the error
handling code.

In crypto_unregister_algs(), unregister the algorithms in reverse order.

Signed-off-by: Thorsten Blum <thorsten.blum@linux.dev>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
crypto/algapi.c