Pass any errors we get during instance creation up through the
larval.
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
{
struct cryptomgr_param *param = data;
struct crypto_template *tmpl;
- int err;
+ int err = -ENOENT;
tmpl = crypto_lookup_template(param->template);
if (!tmpl)
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);