[PATCH 5/5] nvme-fabrics: set ret to -ENODEV for error case
Keith Busch
kbusch at kernel.org
Thu Jan 13 08:28:40 PST 2022
On Tue, Jan 11, 2022 at 10:21:01PM -0800, Chaitanya Kulkarni wrote:
> From: Chaitanya Kulkarni <kch at nvidia.com>
>
> In function nvmf_dev_show() if we don't find the controller set the
> ret variable to -ENODEV.
>
> Signed-off-by: Chaitanya Kulkarni <kch at nvidia.com>
> Suggested-by: Sagi Grimberg <sagi at grimberg.me>
> ---
> drivers/nvme/host/fabrics.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/drivers/nvme/host/fabrics.c b/drivers/nvme/host/fabrics.c
> index df0326db306f..ca23ac926710 100644
> --- a/drivers/nvme/host/fabrics.c
> +++ b/drivers/nvme/host/fabrics.c
> @@ -1097,6 +1097,7 @@ static int nvmf_dev_show(struct seq_file *seq_file, void *private)
> ctrl = seq_file->private;
> if (!ctrl) {
> __nvmf_concat_opt_tokens(seq_file);
> + ret = -ENODEV;
> goto out_unlock;
> }
I missed the discussion on this. Doesn't the __nvmf_concat_opt_tokens()
already return parameters that indicate to the caller that no controller
was found?
More information about the Linux-nvme
mailing list