Skip to content

Commit 795f85f

Browse files
committed
crypto: algboss - Pass instance creation error up
Pass any errors we get during instance creation up through the larval. Signed-off-by: Herbert Xu <[email protected]>
1 parent e7a4142 commit 795f85f

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

crypto/algboss.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ static int cryptomgr_probe(void *data)
5151
{
5252
struct cryptomgr_param *param = data;
5353
struct crypto_template *tmpl;
54-
int err;
54+
int err = -ENOENT;
5555

5656
tmpl = crypto_lookup_template(param->template);
5757
if (!tmpl)
@@ -64,6 +64,7 @@ static int cryptomgr_probe(void *data)
6464
crypto_tmpl_put(tmpl);
6565

6666
out:
67+
param->larval->adult = ERR_PTR(err);
6768
param->larval->alg.cra_flags |= CRYPTO_ALG_DEAD;
6869
complete_all(&param->larval->completion);
6970
crypto_alg_put(&param->larval->alg);

0 commit comments

Comments
 (0)