Re: drivers/nvme/host/auth.c:950 nvme_auth_init_ctrl() warn: missing error code? 'ret'

From: Christoph Hellwig
Date: Fri Dec 23 2022 - 11:42:40 EST


On Fri, Dec 23, 2022 at 07:21:49PM +0300, Dan Carpenter wrote:
> > - if (!ctrl->opts->dhchap_secret && !ctrl->opts->dhchap_ctrl_secret)
> > + if (!ctrl->host_key && !ctrl->ctrl_key)
> > return ret;
>
> ret is uninitialized now.

Yes. Should be a 'return 0'.

We really need to turn the maybe uninitialized warnings back on.