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 cryptomgr_param *param = data;
|
||||||
struct crypto_template *tmpl;
|
struct crypto_template *tmpl;
|
||||||
int err;
|
int err = -ENOENT;
|
||||||
|
|
||||||
tmpl = crypto_lookup_template(param->template);
|
tmpl = crypto_lookup_template(param->template);
|
||||||
if (!tmpl)
|
if (!tmpl)
|
||||||
@ -64,6 +64,7 @@ static int cryptomgr_probe(void *data)
|
|||||||
crypto_tmpl_put(tmpl);
|
crypto_tmpl_put(tmpl);
|
||||||
|
|
||||||
out:
|
out:
|
||||||
|
param->larval->adult = ERR_PTR(err);
|
||||||
param->larval->alg.cra_flags |= CRYPTO_ALG_DEAD;
|
param->larval->alg.cra_flags |= CRYPTO_ALG_DEAD;
|
||||||
complete_all(¶m->larval->completion);
|
complete_all(¶m->larval->completion);
|
||||||
crypto_alg_put(¶m->larval->alg);
|
crypto_alg_put(¶m->larval->alg);
|
||||||
|
Loading…
Reference in New Issue
Block a user