mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-06-28 09:31:14 +00:00
crypto: api - Change crypto_unregister_instance argument type
This patch makes crypto_unregister_instance take a crypto_instance instead of a crypto_alg. This allows us to remove a duplicate CRYPTO_ALG_INSTANCE check in crypto_unregister_instance. Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
This commit is contained in:
parent
1f72371099
commit
87b1675634
3 changed files with 4 additions and 8 deletions
|
@ -551,17 +551,13 @@ err:
|
|||
}
|
||||
EXPORT_SYMBOL_GPL(crypto_register_instance);
|
||||
|
||||
int crypto_unregister_instance(struct crypto_alg *alg)
|
||||
int crypto_unregister_instance(struct crypto_instance *inst)
|
||||
{
|
||||
struct crypto_instance *inst = (void *)alg;
|
||||
LIST_HEAD(list);
|
||||
|
||||
if (!(alg->cra_flags & CRYPTO_ALG_INSTANCE))
|
||||
return -EINVAL;
|
||||
|
||||
down_write(&crypto_alg_sem);
|
||||
|
||||
crypto_remove_spawns(alg, &list, NULL);
|
||||
crypto_remove_spawns(&inst->alg, &list, NULL);
|
||||
crypto_remove_instance(inst, &list);
|
||||
|
||||
up_write(&crypto_alg_sem);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue