diff options
author | Eric Biggers <ebiggers@google.com> | 2020-01-02 20:04:39 -0800 |
---|---|---|
committer | Herbert Xu <herbert@gondor.apana.org.au> | 2020-01-09 11:30:58 +0800 |
commit | a24a1fd731274ebbca873000e2c7fbe8224ae4c8 (patch) | |
tree | 1169096d663feefc1dc6f686fe94cfeba753fae6 /crypto/algboss.c | |
parent | a39c66cc2f6108c8346dc882bdcf72861aaca956 (diff) | |
download | lwn-a24a1fd731274ebbca873000e2c7fbe8224ae4c8.tar.gz lwn-a24a1fd731274ebbca873000e2c7fbe8224ae4c8.zip |
crypto: algapi - remove crypto_template::{alloc,free}()
Now that all templates provide a ->create() method which creates an
instance, installs a strongly-typed ->free() method directly to it, and
registers it, the older ->alloc() and ->free() methods in
'struct crypto_template' are no longer used. Remove them.
Signed-off-by: Eric Biggers <ebiggers@google.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Diffstat (limited to 'crypto/algboss.c')
-rw-r--r-- | crypto/algboss.c | 12 |
1 files changed, 1 insertions, 11 deletions
diff --git a/crypto/algboss.c b/crypto/algboss.c index a62149d6c839..535f1f87e6c1 100644 --- a/crypto/algboss.c +++ b/crypto/algboss.c @@ -58,7 +58,6 @@ static int cryptomgr_probe(void *data) { struct cryptomgr_param *param = data; struct crypto_template *tmpl; - struct crypto_instance *inst; int err; tmpl = crypto_lookup_template(param->template); @@ -66,16 +65,7 @@ static int cryptomgr_probe(void *data) goto out; do { - if (tmpl->create) { - err = tmpl->create(tmpl, param->tb); - continue; - } - - inst = tmpl->alloc(param->tb); - if (IS_ERR(inst)) - err = PTR_ERR(inst); - else if ((err = crypto_register_instance(tmpl, inst))) - tmpl->free(inst); + err = tmpl->create(tmpl, param->tb); } while (err == -EAGAIN && !signal_pending(current)); crypto_tmpl_put(tmpl); |