mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
synced 2024-12-28 08:42:10 +00:00
crypto: algboss - Pass instance creation error up
Pass any errors we get during instance creation up through the larval. Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
This commit is contained in:
parent
e7a4142b35
commit
795f85fca2
@ -51,7 +51,7 @@ static int cryptomgr_probe(void *data)
|
||||
{
|
||||
struct cryptomgr_param *param = data;
|
||||
struct crypto_template *tmpl;
|
||||
int err;
|
||||
int err = -ENOENT;
|
||||
|
||||
tmpl = crypto_lookup_template(param->template);
|
||||
if (!tmpl)
|
||||
@ -64,6 +64,7 @@ static int cryptomgr_probe(void *data)
|
||||
crypto_tmpl_put(tmpl);
|
||||
|
||||
out:
|
||||
param->larval->adult = ERR_PTR(err);
|
||||
param->larval->alg.cra_flags |= CRYPTO_ALG_DEAD;
|
||||
complete_all(¶m->larval->completion);
|
||||
crypto_alg_put(¶m->larval->alg);
|
||||
|
Loading…
Reference in New Issue
Block a user