[PATCH] nvme: do not ignore nvme status in nvme_set_queue_count()
Hannes Reinecke
hare at suse.de
Thu Jan 21 04:50:21 EST 2021
If the call to nvme_set_queue_count() fails with a status we should
not ignore it but rather pass it on to the caller.
It's then up to the transport to decide whether to ignore it
(like PCI does) or to reset the connection (as would be appropriate
for fabrics).
Signed-off-by: Hannes Reinecke <hare at suse.de>
---
drivers/nvme/host/core.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/nvme/host/core.c b/drivers/nvme/host/core.c
index ce1b61519441..ddf32f5b4534 100644
--- a/drivers/nvme/host/core.c
+++ b/drivers/nvme/host/core.c
@@ -1486,7 +1486,7 @@ int nvme_set_queue_count(struct nvme_ctrl *ctrl, int *count)
*count = min(*count, nr_io_queues);
}
- return 0;
+ return status;
}
EXPORT_SYMBOL_GPL(nvme_set_queue_count);
--
2.26.2
More information about the Linux-nvme
mailing list