From: Herbert Xu Date: Sun, 1 Sep 2024 08:06:56 +0000 (+0800) Subject: crypto: algboss - Pass instance creation error up X-Git-Tag: v6.12-rc1~231^2~11 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=795f85fca229a88543a0a706039f901106bf11c1;p=thirdparty%2Fkernel%2Flinux.git crypto: algboss - Pass instance creation error up Pass any errors we get during instance creation up through the larval. Signed-off-by: Herbert Xu --- diff --git a/crypto/algboss.c b/crypto/algboss.c index d05a5aad2176a..a20926bfd34e0 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);