[PATCH 2/3] nvme-fabrics: error out when connect I/O fails

Chaitanya Kulkarni kch at nvidia.com
Mon May 22 06:04:07 PDT 2023


In nvmf_connect_io_queue() when connect I/O commands fails we just
log the connect error and continue processing for authentication.

Add goto out_free_data after logging the connect error to error out.

Signed-off-by: Chaitanya Kulkarni <kch at nvidia.com>
---
 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 529a86aea5f5..9d3df63eb49a 100644
--- a/drivers/nvme/host/fabrics.c
+++ b/drivers/nvme/host/fabrics.c
@@ -548,6 +548,7 @@ int nvmf_connect_io_queue(struct nvme_ctrl *ctrl, u16 qid)
 	if (ret) {
 		nvmf_log_connect_error(ctrl, ret, le32_to_cpu(res.u32),
 				       &cmd, data);
+		goto out_free_data;
 	}
 	result = le32_to_cpu(res.u32);
 	if (result & (NVME_CONNECT_AUTHREQ_ATR | NVME_CONNECT_AUTHREQ_ASCR)) {
-- 
2.40.0




More information about the Linux-nvme mailing list