crypto: omap-aes - prevent unregistering algorithms twice
authorTero Kristo <t-kristo@ti.com>
Wed, 27 May 2020 12:24:28 +0000 (15:24 +0300)
committerHerbert Xu <herbert@gondor.apana.org.au>
Thu, 4 Jun 2020 12:03:42 +0000 (22:03 +1000)
commit9ef4e6e5e31403860081b995f26dc0d4b26356c2
treead2b1211297ec5885b9039197906bf1996c24459
parent63832a0c6fe180aa34d2a77052aa501be6281c99
crypto: omap-aes - prevent unregistering algorithms twice

Most of the OMAP family SoCs contain two instances for AES core, which
causes the remove callbacks to be also done twice when driver is
removed. Fix the algorithm unregister callbacks to take into account the
number of algorithms still registered to avoid removing these twice.

Signed-off-by: Tero Kristo <t-kristo@ti.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
drivers/crypto/omap-aes.c