[PATCH 5/5] nvme-fabrics: set ret to -ENODEV for error case
Chaitanya Kulkarni
chaitanyak at nvidia.com
Tue Jan 11 22:21:01 PST 2022
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;
}
--
2.29.0
More information about the Linux-nvme
mailing list