On Wed, Sep 11, 2024 at 11:08:01AM +0300, Dan Carpenter wrote: > Hello Herbert Xu, > > Commit 795f85fca229 ("crypto: algboss - Pass instance creation error > up") from Sep 1, 2024 (linux-next), leads to the following Smatch > static checker warning: > > crypto/algboss.c:67 cryptomgr_probe() > warn: passing zero to 'ERR_PTR' > > crypto/algboss.c > 50 static int cryptomgr_probe(void *data) > 51 { > 52 struct cryptomgr_param *param = data; > 53 struct crypto_template *tmpl; > 54 int err = -ENOENT; > 55 > 56 tmpl = crypto_lookup_template(param->template); > 57 if (!tmpl) > 58 goto out; > 59 > 60 do { > 61 err = tmpl->create(tmpl, param->tb); > 62 } while (err == -EAGAIN && !signal_pending(current)); > 63 > 64 crypto_tmpl_put(tmpl); > 65 > 66 out: > --> 67 param->larval->adult = ERR_PTR(err); This is intentional. If adult is NULL then the caller will retry the lookup in crypto_larval_wait. Thanks, -- Email: Herbert Xu <herbert@xxxxxxxxxxxxxxxxxxx> Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt