]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
crypto: algboss - Pass instance creation error up
authorHerbert Xu <herbert@gondor.apana.org.au>
Sun, 1 Sep 2024 08:06:56 +0000 (16:06 +0800)
committerHerbert Xu <herbert@gondor.apana.org.au>
Fri, 6 Sep 2024 06:50:46 +0000 (14:50 +0800)
Pass any errors we get during instance creation up through the
larval.

Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
crypto/algboss.c

index d05a5aad2176ad360d35ebf9811bdcd3fd77c443..a20926bfd34e0c5d9b9d33dd031ab479612b4e22 100644 (file)
@@ -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(&param->larval->completion);
        crypto_alg_put(&param->larval->alg);