diff options
author | Herbert Xu <herbert@gondor.apana.org.au> | 2024-09-01 16:06:56 +0800 |
---|---|---|
committer | Herbert Xu <herbert@gondor.apana.org.au> | 2024-09-06 14:50:46 +0800 |
commit | 795f85fca229a88543a0a706039f901106bf11c1 (patch) | |
tree | 7854e83ee4fc981e8eb27db84c5f45c76b05cc6f /crypto | |
parent | e7a4142b35ce489fc8908d75596c51549711ade0 (diff) | |
download | linux-795f85fca229a88543a0a706039f901106bf11c1.tar.gz linux-795f85fca229a88543a0a706039f901106bf11c1.tar.bz2 linux-795f85fca229a88543a0a706039f901106bf11c1.zip |
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>
Diffstat (limited to 'crypto')
-rw-r--r-- | crypto/algboss.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/crypto/algboss.c b/crypto/algboss.c index d05a5aad2176..a20926bfd34e 100644 --- a/crypto/algboss.c +++ b/crypto/algboss.c @@ -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); |