]> git.baikalelectronics.ru Git - kernel.git/commit
crypto: caam - unregister algorithm only if the registration succeeded
authorIuliana Prodan <iuliana.prodan@nxp.com>
Wed, 31 Jul 2019 13:08:14 +0000 (16:08 +0300)
committerHerbert Xu <herbert@gondor.apana.org.au>
Fri, 9 Aug 2019 05:11:51 +0000 (15:11 +1000)
commit0cdeac777667a52df465842f266d73f8bf6e22ab
tree0430a3ead4cc9180dec0fa3d7d8c06551160ab5e
parent270d3cb267e2529753f3fe93ecf59694760b78e0
crypto: caam - unregister algorithm only if the registration succeeded

To know if a registration succeeded added a new struct,
caam_akcipher_alg, that keeps, also, the registration status.
This status is updated in caam_pkc_init and verified in
caam_pkc_exit to unregister an algorithm.

Fixes: 8c7fa1e8fbfc ("crypto: caam - convert top level drivers to libraries")
Signed-off-by: Iuliana Prodan <iuliana.prodan@nxp.com>
Reviewed-by: Horia Geanta <horia.geanta@nxp.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
drivers/crypto/caam/caampkc.c